All of lore.kernel.org
 help / color / mirror / Atom feed
* Is this bug too obvious?
@ 2007-02-14  0:41 Chuck Ebbert
  2007-02-14  0:49 ` Randy Dunlap
  2007-02-14  1:06 ` Daniel Barkalow
  0 siblings, 2 replies; 7+ messages in thread
From: Chuck Ebbert @ 2007-02-14  0:41 UTC (permalink / raw)
  To: linux-kernel; +Cc: Dave Jones

drivers/usb/net/usbnet.c:

int
usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod)
{
        struct usbnet                   *dev;
        struct net_device               *net;
        struct usb_host_interface       *interface;
        struct driver_info              *info;
        struct usb_device               *xdev;
        int                             status;

	...

        net = alloc_etherdev(sizeof(*dev));
                                    ^^^^
	                            *net ???


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Is this bug too obvious?
  2007-02-14  0:41 Is this bug too obvious? Chuck Ebbert
@ 2007-02-14  0:49 ` Randy Dunlap
  2007-02-14  1:06   ` [linux-usb-devel] " David Brownell
  2007-02-14  1:06 ` Daniel Barkalow
  1 sibling, 1 reply; 7+ messages in thread
From: Randy Dunlap @ 2007-02-14  0:49 UTC (permalink / raw)
  To: Chuck Ebbert, lud; +Cc: linux-kernel, Dave Jones

On Tue, 13 Feb 2007 19:41:34 -0500 Chuck Ebbert wrote:

[adding linux-usb-devel]


> drivers/usb/net/usbnet.c:
> 
> int
> usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod)
> {
>         struct usbnet                   *dev;
>         struct net_device               *net;
>         struct usb_host_interface       *interface;
>         struct driver_info              *info;
>         struct usb_device               *xdev;
>         int                             status;
> 
> 	...
> 
>         net = alloc_etherdev(sizeof(*dev));
>                                     ^^^^
> 	                            *net ???
> 
> -


---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [linux-usb-devel] Is this bug too obvious?
  2007-02-14  0:49 ` Randy Dunlap
@ 2007-02-14  1:06   ` David Brownell
  0 siblings, 0 replies; 7+ messages in thread
From: David Brownell @ 2007-02-14  1:06 UTC (permalink / raw)
  To: randy.dunlap, linux-usb-devel, cebbert; +Cc: linux-kernel, davej

No bug; read net/ethernet/eth.c to see what that parameter means.

> > drivers/usb/net/usbnet.c:
> > 
> > int
> > usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod)
> > {
> >         struct usbnet                   *dev;
> >         struct net_device               *net;
> >         struct usb_host_interface       *interface;
> >         struct driver_info              *info;
> >         struct usb_device               *xdev;
> >         int                             status;
> > 
> > 	...
> > 
> >         net = alloc_etherdev(sizeof(*dev));
> >                                     ^^^^
> > 	                            *net ???

It's allocating *extra* space ... used just a few lines later:

        dev = netdev_priv(net);


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Is this bug too obvious?
  2007-02-14  0:41 Is this bug too obvious? Chuck Ebbert
  2007-02-14  0:49 ` Randy Dunlap
@ 2007-02-14  1:06 ` Daniel Barkalow
  2007-02-14  1:13   ` Chuck Ebbert
  1 sibling, 1 reply; 7+ messages in thread
From: Daniel Barkalow @ 2007-02-14  1:06 UTC (permalink / raw)
  To: Chuck Ebbert; +Cc: linux-kernel, Dave Jones

On Tue, 13 Feb 2007, Chuck Ebbert wrote:

> drivers/usb/net/usbnet.c:
> 
> int
> usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod)
> {
>         struct usbnet                   *dev;
>         struct net_device               *net;
>         struct usb_host_interface       *interface;
>         struct driver_info              *info;
>         struct usb_device               *xdev;
>         int                             status;
> 
> 	...
> 
>         net = alloc_etherdev(sizeof(*dev));
>                                     ^^^^
> 	                            *net ???

No, alloc_etherdev takes the size of the private data, which, in this 
case, is *dev.

	-Daniel
*This .sig left intentionally blank*

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Is this bug too obvious?
  2007-02-14  1:06 ` Daniel Barkalow
@ 2007-02-14  1:13   ` Chuck Ebbert
  2007-02-16 22:34     ` usbnet/rndis (was: Is this bug too obvious?) Pete Zaitcev
  0 siblings, 1 reply; 7+ messages in thread
From: Chuck Ebbert @ 2007-02-14  1:13 UTC (permalink / raw)
  To: Daniel Barkalow; +Cc: linux-kernel, Dave Jones

Daniel Barkalow wrote:
> On Tue, 13 Feb 2007, Chuck Ebbert wrote:
> 
>> drivers/usb/net/usbnet.c:
>>
>> int
>> usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod)
>> {
>>         struct usbnet                   *dev;
>>         struct net_device               *net;
>>         struct usb_host_interface       *interface;
>>         struct driver_info              *info;
>>         struct usb_device               *xdev;
>>         int                             status;
>>
>> 	...
>>
>>         net = alloc_etherdev(sizeof(*dev));
>>                                     ^^^^
>> 	                            *net ???
> 
> No, alloc_etherdev takes the size of the private data, which, in this 
> case, is *dev.
> 
> 	-Daniel
> *This .sig left intentionally blank*

OK I'll keep looking for the cause of the oops then:

https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=228231


^ permalink raw reply	[flat|nested] 7+ messages in thread

* usbnet/rndis (was: Is this bug too obvious?)
  2007-02-14  1:13   ` Chuck Ebbert
@ 2007-02-16 22:34     ` Pete Zaitcev
  2007-02-16 23:37       ` [linux-usb-devel] " David Brownell
  0 siblings, 1 reply; 7+ messages in thread
From: Pete Zaitcev @ 2007-02-16 22:34 UTC (permalink / raw)
  To: Chuck Ebbert; +Cc: linux-kernel, Dave Jones, zaitcev, linux-usb-devel

On Tue, 13 Feb 2007 20:13:06 -0500, Chuck Ebbert <cebbert@redhat.com> wrote:

> OK I'll keep looking for the cause of the oops then:
> 
> https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=228231

> Feb 12 01:11:29 MyComputer kernel: ohci_hcd 0000:00:02.1: auto-wakeup
> Feb 12 01:11:30 MyComputer kernel: usb 2-3: new full speed USB device using ohci_hcd and address 2
> Feb 12 01:11:30 MyComputer kernel: usb 2-3: configuration #1 chosen from 1 choice
> Feb 12 01:11:30 MyComputer kernel: drivers/usb/class/cdc-acm.c: Ignoring extra header, type -3, length 4
> Feb 12 01:11:30 MyComputer kernel: cdc_acm 2-3:1.1: ttyACM0: USB ACM device
> Feb 12 01:11:30 MyComputer kernel: usbcore: registered new interface driver cdc_acm
> Feb 12 01:11:30 MyComputer kernel: drivers/usb/class/cdc-acm.c: v0.25:USB Abstract Control Model driver for USB modems and ISDN adapters
> Feb 12 01:11:31 MyComputer kernel: usbcore: registered new interface driver cdc_ether
> Feb 12 01:11:31 MyComputer kernel: rndis_host 2-3:1.9: RNDIS init failed, -110
> Feb 12 01:11:31 MyComputer kernel: usb%d: unregister 'rndis_host' usb-0000:00:02.1-3, RNDIS device
> Feb 12 01:11:31 MyComputer kernel: BUGging on (!PageSlab(page))
> Feb 12 01:11:31 MyComputer kernel: ------------[ cut here ]------------
> Feb 12 01:11:31 MyComputer kernel: kernel BUG at mm/slab.c:594!

This looks like a kfree with a bogus address, possibly poisoned.

If you don't do it sooner, I'll look at the error paths in rndis
and/or usbnet.

BTW, for USB code, it's best to send to linux-usb-devel@lists.sourceforge.net.

-- Pete

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [linux-usb-devel] usbnet/rndis (was: Is this bug too obvious?)
  2007-02-16 22:34     ` usbnet/rndis (was: Is this bug too obvious?) Pete Zaitcev
@ 2007-02-16 23:37       ` David Brownell
  0 siblings, 0 replies; 7+ messages in thread
From: David Brownell @ 2007-02-16 23:37 UTC (permalink / raw)
  To: linux-usb-devel; +Cc: Pete Zaitcev, Chuck Ebbert, Dave Jones, linux-kernel


> If you don't do it sooner, I'll look at the error paths in rndis
> and/or usbnet.

Try that patch I sent by this morning.  ISTR getting some
positive reports from that...

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2007-02-16 23:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-14  0:41 Is this bug too obvious? Chuck Ebbert
2007-02-14  0:49 ` Randy Dunlap
2007-02-14  1:06   ` [linux-usb-devel] " David Brownell
2007-02-14  1:06 ` Daniel Barkalow
2007-02-14  1:13   ` Chuck Ebbert
2007-02-16 22:34     ` usbnet/rndis (was: Is this bug too obvious?) Pete Zaitcev
2007-02-16 23:37       ` [linux-usb-devel] " David Brownell

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.