summaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/f_phonet.c
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2012-03-23 23:59:33 +0000
committerDavid S. Miller <davem@davemloft.net>2012-03-25 13:29:58 -0400
commit50269e19ad990e79eeda101fc6df80cffd5d4831 (patch)
tree903d80ba1b1fc0eb15e122a8c12a72f72e7ed2de /drivers/usb/gadget/f_phonet.c
parent0015e551edb1d28191567d8a7d1ce5edda404ced (diff)
downloadblackbird-op-linux-50269e19ad990e79eeda101fc6df80cffd5d4831.tar.gz
blackbird-op-linux-50269e19ad990e79eeda101fc6df80cffd5d4831.zip
net: add a truesize parameter to skb_add_rx_frag()
skb_add_rx_frag() API is misleading. Network skbs built with this helper can use uncharged kernel memory and eventually stress/crash machine in OOM. Add a 'truesize' parameter and then fix drivers in followup patches. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Cc: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/usb/gadget/f_phonet.c')
-rw-r--r--drivers/usb/gadget/f_phonet.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/gadget/f_phonet.c b/drivers/usb/gadget/f_phonet.c
index 7cdcb63b21ff..85a5cebe96b3 100644
--- a/drivers/usb/gadget/f_phonet.c
+++ b/drivers/usb/gadget/f_phonet.c
@@ -345,7 +345,7 @@ static void pn_rx_complete(struct usb_ep *ep, struct usb_request *req)
}
skb_add_rx_frag(skb, skb_shinfo(skb)->nr_frags, page,
- skb->len <= 1, req->actual);
+ skb->len <= 1, req->actual, req->actual);
page = NULL;
if (req->actual < req->length) { /* Last fragment */
OpenPOWER on IntegriCloud