Discussion:
[Bugme-new] [Bug 9594] New: Dereferencing NULL pointer on drivers/usb/gadget/ether.c
Andrew Morton
2007-12-18 06:29:39 UTC
Permalink
http://bugzilla.kernel.org/show_bug.cgi?id=9594
Summary: Dereferencing NULL pointer on drivers/usb/gadget/ether.c
Product: Drivers
Version: 2.5
KernelVersion: 2.6.23
Platform: All
OS/Version: Linux
Tree: Mainline
Status: NEW
Severity: normal
Priority: P1
Component: USB
(1) line 1050: let the second conjunct on the "if" statment be false
meaning "dev->status_ep" is null. This means the "if" evaluates to false.
follow thru the code until...
(2) line 1101: usb_ep_disable(dev->status_ep) passes in a null argument,
static inline int
usb_ep_disable (struct usb_ep *ep)
{
return ep->ops->disable (ep);
}
--
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
linux-usb-***@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
David Brownell
2007-12-19 18:18:50 UTC
Permalink
http://bugzilla.kernel.org/show_bug.cgi?id=9594
...
(1) line 1050: let the second conjunct on the "if" statment be false
meaning "dev->status_ep" is null. This means the "if" evaluates to false.
I'm guessing this is really line 1020 at the top of set_ether_config(),
in the current kernel. Because line 1050 has nothing to do with status_ep.
follow thru the code until...
(2) line 1101: usb_ep_disable(dev->status_ep) passes in a null argument,
And I'm assuming that's 51 lines later, the "on error..." path.
As we know, no errors happen hence all error paths work Just Fine. ;)

Another way to put this diagnosis is that the same test needs to
be used in both places, else it's overkill in one of them.


-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
linux-usb-***@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Loading...