From: Harish Jenny K N <harish_kandiga@mentor.com>
To: Felipe Balbi <balbi@kernel.org>
Cc: <linux-usb@vger.kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
<linux-kernel@vger.kernel.org>,
Jim Baxter <jim_baxter@mentor.com>, <harish_kandiga@mentor.com>,
<tpolle@de.adit-jv.com>
Subject: [PATCH v1 2/3] usb: gadget: NCM: link socket buffers to the device for received packets
Date: Thu, 15 Sep 2016 16:22:57 +0200 [thread overview]
Message-ID: <1473949378-13692-3-git-send-email-harish_kandiga@mentor.com> (raw)
In-Reply-To: <1473949378-13692-1-git-send-email-harish_kandiga@mentor.com>
From: Torsten Polle <tpolle@de.adit-jv.com>
Socket buffers should be linked to the (network) device that allocated
the buffers. __netdev_alloc_skb performs this task.
Signed-off-by: Torsten Polle <tpolle@de.adit-jv.com>
Signed-off-by: Jim Baxter <jim_baxter@mentor.com>
Signed-off-by: Harish Jenny K N <harish_kandiga@mentor.com>
---
drivers/usb/gadget/function/u_ether.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/gadget/function/u_ether.c b/drivers/usb/gadget/function/u_ether.c
index 8cb0803..d8593c7 100644
--- a/drivers/usb/gadget/function/u_ether.c
+++ b/drivers/usb/gadget/function/u_ether.c
@@ -224,7 +224,7 @@ static void defer_kevent(struct eth_dev *dev, int flag)
if (dev->port_usb->is_fixed)
size = max_t(size_t, size, dev->port_usb->fixed_out_len);
- skb = alloc_skb(size + NET_IP_ALIGN, gfp_flags);
+ skb = __netdev_alloc_skb(dev->net, size + NET_IP_ALIGN, gfp_flags);
if (skb == NULL) {
DBG(dev, "no rx skb\n");
goto enomem;
--
1.7.9.5
next prev parent reply other threads:[~2016-09-15 14:24 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <Harish Jenny K N <harish_kandiga@mentor.com>
2016-09-08 9:18 ` [PATCH v1 0/1] usb: gadget: f_fs: Stop ffs_closed NULL pointers Harish Jenny K N
2016-09-08 9:18 ` [PATCH v1 1/1] " Harish Jenny K N
2016-09-09 9:30 ` [PATCH v1 0/2] usb: gadget: NCM: NULL pointer dereference in eth_start_xmit Harish Jenny K N
2016-09-09 9:30 ` [PATCH v1 1/2] usb: gadget: u_ether: fix another dereference after null check Harish Jenny K N
2016-09-10 3:39 ` Peter Chen
2016-09-09 9:30 ` [PATCH v1 2/2] usb: gadget: NCM: Protect dev->port_usb using dev->lock Harish Jenny K N
2016-09-15 14:22 ` [PATCH v1 0/3] Usb gadget ncm code cleanup Harish Jenny K N
2016-09-15 14:22 ` [PATCH v1 1/3] usb: gadget: NCM: link socket buffers to the device for tx packets Harish Jenny K N
2016-09-15 14:22 ` Harish Jenny K N [this message]
2016-09-15 18:35 ` [PATCH v1 2/3] usb: gadget: NCM: link socket buffers to the device for received packets Yauheni Kaliuta
2016-09-16 9:54 ` Harish Jenny K N
2016-09-15 14:22 ` [PATCH v1 3/3] usb: gadget: NCM: differentiate consumed packets from dropped packets Harish Jenny K N
2016-09-19 8:05 ` [PATCH v2 0/3] Usb gadget ncm code cleanup Harish Jenny K N
2016-09-19 8:05 ` [PATCH v2 1/3] usb: gadget: NCM: link socket buffers to the device for tx packets Harish Jenny K N
2016-09-19 8:05 ` [PATCH v2 2/3] usb: gadget: u_ether: link socket buffers to the device for received packets Harish Jenny K N
2016-09-19 8:05 ` [PATCH v2 3/3] usb: gadget: NCM: differentiate consumed packets from dropped packets Harish Jenny K N
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1473949378-13692-3-git-send-email-harish_kandiga@mentor.com \
--to=harish_kandiga@mentor.com \
--cc=balbi@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=jim_baxter@mentor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=tpolle@de.adit-jv.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®