From: David Brownell <david-b@pacbell.net>
To: linux-usb-devel@lists.sourceforge.net
Cc: Adrian Bunk <bunk@stusta.de>,
greg@kroah.com, linux-kernel@vger.kernel.org
Subject: Re: [linux-usb-devel] drivers/usb/gadget/ether.c: NULL dereference
Date: Sat, 11 Nov 2006 22:35:48 -0800 [thread overview]
Message-ID: <200611112235.49931.david-b@pacbell.net> (raw)
In-Reply-To: <20061111160643.GA8809@stusta.de>
On Saturday 11 November 2006 8:06 am, Adrian Bunk wrote:
> The Coverity checker spotted the following NULL dereference of "skb" in
> drivers/usb/gadget/ether.c:
I don't see such a dereference. As usual, free(NULL) is legit.
Is this another case of bogus reports from Coverity? I still need to
revert a bug in the EHCI debug code caused by someone "fixing" it
because Coverity doesn't understand unions...
> <-- snip -->
>
> ...
> static int
> rx_submit (struct eth_dev *dev, struct usb_request *req, gfp_t gfp_flags)
> {
> struct sk_buff *skb;
> int retval = -ENOMEM;
> ...
> if ((skb = alloc_skb (size + NET_IP_ALIGN, gfp_flags)) == 0) {
> DEBUG (dev, "no rx skb\n");
> goto enomem;
> }
> ...
> enomem:
> defer_kevent (dev, WORK_RX_MEMORY);
> if (retval) {
> DEBUG (dev, "rx submit --> %d\n", retval);
> dev_kfree_skb_any (skb);
> ...
>
> <-- snip -->
>
> cu
> Adrian
>
next prev parent reply other threads:[~2006-11-12 6:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-11 16:06 drivers/usb/gadget/ether.c: NULL dereference Adrian Bunk
2006-11-12 6:35 ` David Brownell [this message]
2006-11-12 6:50 ` [linux-usb-devel] " Adrian Bunk
2006-11-12 7:10 ` David Brownell
2006-11-12 12:23 ` Adrian Bunk
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=200611112235.49931.david-b@pacbell.net \
--to=david-b@pacbell.net \
--cc=bunk@stusta.de \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb-devel@lists.sourceforge.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.