public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [linux-2.6.5] oops when plugging CDC USB network
@ 2004-05-11 16:33 Gerald Schaefer
  0 siblings, 0 replies; only message in thread
From: Gerald Schaefer @ 2004-05-11 16:33 UTC (permalink / raw)
  To: linux-usb-devel, linux-kernel

Daniel Blueman wrote:
> Unable to handle kernel NULL pointer dereference at virtual address 00000004
>  printing eip:
> c028ff64
> *pde = 00000000
> Oops: 0000 [#1]
> DEBUG_PAGEALLOC
> CPU:    0
> EIP:    0060:[<c028ff64>]    Not tainted
> EFLAGS: 00010296   (2.6.5) 
> EIP is at usb_disable_interface+0x14/0x50
> eax: df3a4ef8   ebx: 00000000   ecx: 00000000   edx: dffdaf38
> esi: 00000001   edi: 00000000   ebp: df3aabf8   esp: df98bcfc   
> ds: 007b   es: 007b   ss: 0068
> Process khubd (pid: 5, threadinfo=df98a000 task=df9bb9e0)
> Stack: 00000001 0000000b 00000001 00000001 df3d5d94 df3aabf8 c0290257
> df3aabf8
>        df3a4ef8 0000000b 00000001 00000001 00000001 00000000 00000000
> 00001388
>        00000000 df3a4ef8 df3d5d94 df3d5d94 df3d5d44 00000001 c029e301
> df3aabf8
> Call Trace:
>  [<c0290257>] usb_set_interface+0xb7/0x1a0

I had the same problem with my USB DSL Modem. After looking at
usb_set_interface() I noticed that iface->cur_altsetting is set
after calling usb_disable_interface(), although iface->cur_altsetting
is being accessed at the beginning of usb_disable_interface().

The following patch solved my problem, maybe it helps you too (the
patch is for 2.6.6, but my problem also existed in 2.6.5).
I am however not at all familiar with the USB kernel code, so it may
be a good idea to wait for a comment on this patch from someone who is...


--
Gerald

--- linux-2.6.6/drivers/usb/core/message.c	2004-05-11 18:11:52.000000000 +0200
+++ linux-2.6.6-new/drivers/usb/core/message.c	2004-05-11 18:15:53.000000000 +0200
@@ -965,9 +965,8 @@
 	 */
 
 	/* prevent submissions using previous endpoint settings */
-	usb_disable_interface(dev, iface);
-
 	iface->cur_altsetting = alt;
+	usb_disable_interface(dev, iface);
 
 	/* If the interface only has one altsetting and the device didn't
 	 * accept the request, we attempt to carry out the equivalent action

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-05-11 16:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-11 16:33 [linux-2.6.5] oops when plugging CDC USB network Gerald Schaefer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox