summaryrefslogtreecommitdiffstats
path: root/net/phonet/pep-gprs.c
Commit message (Collapse)AuthorAgeFilesLines
* net: Fix use after free by removing length arg from sk_data_ready callbacks.David S. Miller2014-04-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Several spots in the kernel perform a sequence like: skb_queue_tail(&sk->s_receive_queue, skb); sk->sk_data_ready(sk, skb->len); But at the moment we place the SKB onto the socket receive queue it can be consumed and freed up. So this skb->len access is potentially to freed up memory. Furthermore, the skb->len can be modified by the consumer so it is possible that the value isn't accurate. And finally, no actual implementation of this callback actually uses the length argument. And since nobody actually cared about it's value, lots of call sites pass arbitrary values in such as '0' and even '1'. So just remove the length argument from the callback, that way there is no confusion whatsoever and all of these use-after-free cases get fixed as a side effect. Based upon a patch by Eric Dumazet and his suggestion to audit this issue tree-wide. Signed-off-by: David S. Miller <davem@davemloft.net>
* net: remove my future former mail addressRémi Denis-Courmont2012-06-181-1/+1
| | | | | | Signed-off-by: Rémi Denis-Courmont <remi@remlab.net> Cc: Sakari Ailus <sakari.ailus@nokia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Phonet: zero-copy aligned GPRS RXRémi Denis-Courmont2010-01-071-2/+2
| | | | | | | Newer Nokia cellular modems can use aligned payload for their GPRS pipe. Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* netdev: convert pseudo drivers to netdev_tx_tStephen Hemminger2009-09-011-1/+1
| | | | | | | These are all drivers that don't touch real hardware. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: use NETDEV_TX_OK instead of 0 in ndo_start_xmit() functionsPatrick McHardy2009-07-061-2/+2
| | | | | | | | | | | This patch is the result of an automatic spatch transformation to convert all ndo_start_xmit() return values of 0 to NETDEV_TX_OK. Some occurences are missed by the automatic conversion, those will be handled in a seperate patch. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* phonet: Use frag list abstraction interfaces.David S. Miller2009-06-091-2/+2
| | | | Signed-off-by: David S. Miller <davem@davemloft.net>
* Phonet: fix accounting race between gprs_writeable() and gprs_xmit()Rémi Denis-Courmont2009-06-021-2/+3
| | | | | | | | In the unlikely event that gprs_writeable() and gprs_xmit() check for writeability at the same, we could stop the device queue forever. Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Phonet: fix double free in GPRS outbound packet error pathRémi Denis-Courmont2009-02-111-1/+0Star
| | | | | Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* phonet: update to net_device_opsStephen Hemminger2009-01-081-4/+8
| | | | | Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Phonet: get rid of deferred work on the transmission pathRémi Denis-Courmont2008-12-181-63/+28Star
| | | | | Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Phonet: allocate separate ARP type for GPRS over a Phonet pipeRémi Denis-Courmont2008-12-181-1/+1
| | | | | | | | A separate xmit lock class supports GPRS over a Phonet pipe over a TUN device (type ARPHRD_NONE). Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Phonet: improve GPRS variable namesRémi Denis-Courmont2008-12-161-84/+86
| | | | | Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'master' of ↵David S. Miller2008-12-161-5/+22
|\ | | | | | | | | | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/net/e1000e/ich8lan.c
| * Phonet: keep TX queue disabled when the device is offRémi Denis-Courmont2008-12-151-5/+22
| | | | | | | | | | Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | Phonet: use net_device built-in stats for GPRSRémi Denis-Courmont2008-11-111-20/+13Star
| | | | | | | | | | Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | phonet: sparse annotations of protocol, remove forward declarationHarvey Harrison2008-11-071-4/+4
|/ | | | | | | | | | | | | | | | net/phonet/af_phonet.c:38:36: error: marked inline, but without a definition net/phonet/pep-gprs.c:63:10: warning: incorrect type in return expression (different base types) net/phonet/pep-gprs.c:63:10: expected int net/phonet/pep-gprs.c:63:10: got restricted __be16 [usertype] <noident> net/phonet/pep-gprs.c:65:10: warning: incorrect type in return expression (different base types) net/phonet/pep-gprs.c:65:10: expected int net/phonet/pep-gprs.c:65:10: got restricted __be16 [usertype] <noident> net/phonet/pep-gprs.c:124:16: warning: incorrect type in assignment (different base types) net/phonet/pep-gprs.c:124:16: expected restricted __be16 [usertype] protocol net/phonet/pep-gprs.c:124:16: got unsigned short [unsigned] [usertype] protocol Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Phonet: implement GPRS virtual interface over PEP socketRémi Denis-Courmont2008-10-051-0/+347
Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com> Signed-off-by: David S. Miller <davem@davemloft.net>