Hi all,
I'm currently maintener of a driver of an USB xDSL modem (
https://gna.org/projects/eagleusb/)
One of my user, while trying to play with kernel 2.6.5-rc2 get the following error:
usb 2-3: new full speed USB device using address 3
[eagle-usb] driver V2 loaded
drivers/usb/core/usb.c: registered new driver eagle-usb
[eagle-usb] New USB ADSL device detected, waiting for DSP code...
[eagle-usb] Interface 0 accepted.
Unable to handle kernel NULL pointer dereference at virtual address 00000004
printing eip:
c02b1ce4
*pde = 00000000
Oops: 0000 [#1]
CPU: 0
EIP: 0060:[<c02b1ce4>] Not tainted
EFLAGS: 00010296 (2.6.5-rc2)
EIP is at usb_disable_interface+0x14/0x50
eax: dde73ec0 ebx: 00000000 ecx: 00000282 edx: dffef0c0
esi: 00000008 edi: 00000000 ebp: df6f9800 esp: dfdb1d6c
ds: 007b es: 007b ss: 0068
Process khubd (pid: 5, threadinfo=dfdb0000 task=dff90040)
Stack: 00000008 0000000b 00000002 00000008 dde73e80 df6f9800 c02b1fa7 df6f9800
dde73ec0 0000000b 00000001 00000008 00000002 00000000 00000000 00001388
00000000 dde73ec0 de377000 de3775d8 de3775f4 de377000 e0a8770c df6f9800
Call Trace:
[<c02b1fa7>] usb_set_interface+0xb7/0x180
[<e0a8770c>] eu_init_postfirm+0x3dc/0x6f0 [eagle_usb]
[<c017c65d>] sysfs_new_inode+0x5d/0xb0
[<e0a87150>] eu_probe+0x150/0x1f0 [eagle_usb]
[<c02ac281>] usb_probe_interface+0x61/0x80
[<c024c4cf>] bus_match+0x3f/0x70
[<c024c541>] device_attach+0x41/0xa0
[<c024c72b>] bus_add_device+0x5b/0xa0
[<c024b5d1>] device_add+0xa1/0x130
[<c02b2346>] usb_set_configuration+0x1d6/0x270
[<c02ad2e9>] usb_new_device+0x249/0x3c0
[<c02aeb08>] hub_port_connect_change+0x178/0x280
[<c02aeeb0>] hub_events+0x2a0/0x300
[<c02aef3d>] hub_thread+0x2d/0xf0
[<c0116a80>] default_wake_function+0x0/0x20
[<c02aef10>] hub_thread+0x0/0xf0
[<c0104d91>] kernel_thread_helper+0x5/0x14
Code: 80 7b 04 00 74 26 31 f6 8d 74 26 00 8b 43 0c 47 0f b6 44 30
I also tried 2.6.5-rc2 kernel and get the _same_ error, but *not* every time.
The piece of code where the Oops happens is the following :
/*
* Interface 1 is for outbound traffic
*/
tmp = usb_driver_claim_interface(&eu_driver, GET_INTF_PTR(usb,1), ins);
if ( tmp != 0 )
{
eu_report ("Failed to claim interface 1 (%d)\n",-tmp);
goto free_oam_timer;
}
/*
* Interface 2 is for inbound traffic
*/
usb_driver_claim_interface(&eu_driver, GET_INTF_PTR(usb,2), ins);
if ( tmp != 0 )
{
eu_report ("Failed to claim interface 2 (%d)\n",-tmp);
goto release_intf_1;
}
#ifndef USEBULK
/*
* Set alternate interface to 8, which is ISO transport
* with the max. packet size ( about 1007 bytes)
*/
if (usb_set_interface(usb, 2, FASTEST_ISO_INTF) < 0)
{
eu_err ("usb_set_interface failed on iso alt 8\n");
}
#endif /* USEBULK */
Thus we're probed on interface 0, we're claiming interface 1 and 2, and after
claiming interface 2, we try to change it's alternate settings if we're in ISO
mode... and Oops ... (note the GET_INTF_PTR is a macro that aims to have almost
same code for 2.4 and 2.6, and resumes to
#define GET_INTF_PTR(u,n) ((u)->actconfig->interface[(n)])
on 2.6.x kernels)
I think that the aforementioned dereference can be found in usb_disable_interface :
void usb_disable_interface(struct usb_device *dev, struct usb_interface *intf)
{
struct usb_host_interface *alt = intf->cur_altsetting;
^
|
here -----------------------------+
Note, that it seems some other user have exactly the same error :
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&selm=1Dn1i-3j8-55%40gated-at.bofh.it&rnum=14
Does anybody has idea on this ? Is my logic ( claiming interface 2 and then
changing it's alternate settings) bugged ?
Best Regards.
Frederick Ros aka Sleeper
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel