Re: [BUG] 2.6.31.2 io_ti

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Alan Stern a écrit :
| Are you sure you are running the patched driver?
|
| Try this: Add a printk statement near the start of destroy_serial() in
| drivers/usb/serial/usb-serial.c, just after the dbg() line.  Make it
| print out the value of serial->num_ports.
|
| You can also add some printk statements to edge_release() in
| io_edgeport.c.  Try to pin down exactly which statement causes the
| invalid memory reference.
|
| Alan Stern
|

I've upgraded to 2.6.31.3, rebuilt everything, problem persists. Below
are the modifications I made, the printk in edge_release are not
printed... I confirm that 2.6.31.1 is fine. I tried on my portable
computer with unmodified kernel 2.6.32-rc3, it does also BUG, see below.

drivers/usb/serial/usb-serial.c{.ORIG,}
- --- drivers/usb/serial/usb-serial.c.ORIG        2009-10-08
05:59:54.000000000 -1000
+++ drivers/usb/serial/usb-serial.c     2009-10-08 06:12:19.000000000 -1000
@@ -150,6 +150,7 @@
~        serial = to_usb_serial(kref);

~        dbg("%s - %s", __func__, serial->type->description);
+   printk("destroy_serial: serial->num_ports=%d\n", serial->num_ports);

~        /* return the minor range that this device had */
~        if (serial->minor != SERIAL_TTY_NO_MINOR)
@@ -921,8 +922,10 @@
~                                                __func__, max_endpoints);
~        for (i = 0; i < max_endpoints; ++i) {
~                port = kzalloc(sizeof(struct usb_serial_port), GFP_KERNEL);
- -               if (!port)
+               if (!port) {
+         serial->num_ports = i;
~                        goto probe_error;
+      }
~                tty_port_init(&port->port);
~                port->port.ops = &serial_port_ops;
~                port->serial = serial;

- --- drivers/usb/serial/io_edgeport.c.ORIG       2009-09-24
05:45:25.000000000 -1000
+++ drivers/usb/serial/io_edgeport.c    2009-10-08 07:23:34.000000000 -1000
@@ -3223,13 +3223,18 @@

****************************************************************************/
~ static void edge_release(struct usb_serial *serial)
~ {
- -       struct edgeport_serial *edge_serial = usb_get_serial_data(serial);
+       struct edgeport_serial *edge_serial;
~        int i;

~        dbg("%s", __func__);

- -       for (i = 0; i < serial->num_ports; ++i)
+   printk("In edge_release \n")
+       edge_serial = usb_get_serial_data(serial);
+   printk("edge_release: serial->num_ports=%d\n", serial->num_ports);
+       for (i = 0; i < serial->num_ports; ++i) {
+      printk("edge_release: port=%d\n", i);
~                kfree(usb_get_serial_port_data(serial->port[i]));
+   }

~        kfree(edge_serial);
~ }

kernel 2.6.31.3
- ------------------------------------------------------------------------------------------
Oct  8 07:28:06 tiare kernel: usb 5-2: new full speed USB device using
uhci_hcd and address 2
Oct  8 07:28:06 tiare kernel: usb 5-2: New USB device found,
idVendor=1608, idProduct=0288
Oct  8 07:28:06 tiare kernel: usb 5-2: New USB device strings: Mfr=0,
Product=0, SerialNumber=0
Oct  8 07:28:06 tiare kernel: usb 5-2: configuration #1 chosen from 1 choice
Oct  8 07:28:06 tiare kernel: hub 5-2:1.0: USB hub found
Oct  8 07:28:06 tiare kernel: hub 5-2:1.0: 1 port detected
Oct  8 07:28:06 tiare kernel: usb 5-2.1: new full speed USB device using
uhci_hcd and address 3
Oct  8 07:28:06 tiare kernel: usb 5-2.1: New USB device found,
idVendor=1608, idProduct=021d
Oct  8 07:28:06 tiare kernel: usb 5-2.1: New USB device strings: Mfr=0,
Product=0, SerialNumber=0
Oct  8 07:28:06 tiare kernel: usb 5-2.1: configuration #1 chosen from 1
choice
Oct  8 07:28:06 tiare kernel: usbcore: registered new interface driver
usbserial
Oct  8 07:28:06 tiare kernel: USB Serial support registered for generic
Oct  8 07:28:06 tiare kernel: usbcore: registered new interface driver
usbserial_generic
Oct  8 07:28:06 tiare kernel: usbserial: USB Serial Driver core
Oct  8 07:28:06 tiare kernel: USB Serial support registered for Edgeport
TI 1 port adapter
Oct  8 07:28:06 tiare kernel: USB Serial support registered for Edgeport
TI 2 port adapter
Oct  8 07:28:06 tiare kernel: io_ti 5-2.1:1.0: Edgeport TI 2 port
adapter converter detected
Oct  8 07:28:07 tiare kernel: usb 5-2.1: firmware: requesting
edgeport/down3.bin
Oct  8 07:28:07 tiare kernel: destroy_serial: serial->num_ports=2
Oct  8 07:28:07 tiare kernel: BUG: unable to handle kernel NULL pointer
dereference at 0000000000000080
Oct  8 07:28:07 tiare kernel: IP: [<ffffffffa02acaac>]
edge_release+0x2c/0x80 [io_ti]
Oct  8 07:28:07 tiare kernel: PGD 10e95b067 PUD 10ea55067 PMD 0
Oct  8 07:28:07 tiare kernel: Oops: 0000 [#1] PREEMPT SMP
Oct  8 07:28:07 tiare kernel: last sysfs file:
/sys/class/firmware/5-2.1/loading
Oct  8 07:28:07 tiare kernel: CPU 0
Oct  8 07:28:07 tiare kernel: Modules linked in: io_ti(+) usbserial
dahdi_echocan_mg2 wcb4xxp dahdi autofs4 crc_ccitt nfs nfs_acl
auth_rpcgss tun af_packet it87 hwmon_vid binfmt_misc loop dm_mirror
dm_region_hash dm_log cpufreq_conservative cpufreq_powersave
snd_seq_dummy snd_seq_oss snd_seq_midi_event snd_seq snd_seq_device
stv0299 8139too snd_pcm_oss b2c2_flexcop_pci snd_mixer_oss b2c2_flexcop
dvb_core sr_mod mii sky2 i2c_i801 i2c_core rtc_cmos rtc_core rtc_lib
8250_pnp 8250 serial_core snd_hda_intel floppy thermal processor button
snd_hda_codec snd_pcm snd_timer snd soundcore snd_page_alloc uhci_hcd
ehci_hcd sg evdev usbcore
Oct  8 07:28:07 tiare kernel: Pid: 5527, comm: modprobe Not tainted
2.6.31.3-sysnux #3
Oct  8 07:28:07 tiare kernel: RIP: 0010:[<ffffffffa02acaac>]
[<ffffffffa02acaac>] edge_release+0x2c/0x80 [io_ti]
Oct  8 07:28:07 tiare kernel: RSP: 0018:ffff88011851fbe8  EFLAGS: 00010246
Oct  8 07:28:07 tiare kernel: RAX: ffff88010ea77c00 RBX:
0000000000000000 RCX: ffff880028030ad8
Oct  8 07:28:07 tiare kernel: RDX: ffff880028022000 RSI:
0000000000000046 RDI: 0000000000000000
Oct  8 07:28:07 tiare kernel: RBP: 0000000000000000 R08:
0000000000000000 R09: ffff8800000bb700
Oct  8 07:28:07 tiare udevd-event[5526]: run_program: '/sbin/modprobe'
abnormal exit
Oct  8 07:28:07 tiare kernel: R10: 0000000000000000 R11:
ffffffff8119f7e0 R12: ffff8801181ab240
Oct  8 07:28:07 tiare kernel: R13: ffffffffa02b4520 R14:
0000000000000001 R15: ffff88011851fc90
Oct  8 07:28:07 tiare kernel: FS:  00007fcc6dc066f0(0000)
GS:ffff880028022000(0000) knlGS:0000000000000000
Oct  8 07:28:07 tiare kernel: CS:  0010 DS: 0000 ES: 0000 CR0:
000000008005003b
Oct  8 07:28:07 tiare kernel: CR2: 0000000000000080 CR3:
000000010e89b000 CR4: 00000000000006f0
Oct  8 07:28:07 tiare kernel: DR0: 0000000000000000 DR1:
0000000000000000 DR2: 0000000000000000
Oct  8 07:28:07 tiare kernel: DR3: 0000000000000000 DR6:
00000000ffff0ff0 DR7: 0000000000000400
Oct  8 07:28:07 tiare kernel: Process modprobe (pid: 5527, threadinfo
ffff88011851e000, task ffff88010ea1daf0)
Oct  8 07:28:07 tiare kernel: Stack:
Oct  8 07:28:07 tiare kernel:  ffff8801181ab2a0 ffff8801181ab240
ffff88012e61b780 ffffffffa02a056e
Oct  8 07:28:07 tiare kernel: <0> 000000030ea745a0 ffff8801181ab2a0
ffffffffa02a04e0 ffffffff81182e43
Oct  8 07:28:07 tiare kernel: <0> ffffffffa02b4520 00000000fffffffb
0000000000000040 ffffffffa02a0fbb
Oct  8 07:28:07 tiare kernel: Call Trace:

Oct  8 07:28:07 tiare kernel:  [<ffffffffa02a056e>] ?
destroy_serial+0x8e/0x130 [usbserial]
Oct  8 07:28:07 tiare kernel:  [<ffffffffa02a04e0>] ?
destroy_serial+0x0/0x130 [usbserial]
Oct  8 07:28:07 tiare kernel:  [<ffffffff81182e43>] ? kref_put+0x33/0x70
Oct  8 07:28:07 tiare kernel:  [<ffffffffa02a0fbb>] ?
usb_serial_probe+0x68b/0x11a0 [usbserial]
Oct  8 07:28:07 tiare kernel:  [<ffffffff81180fb5>] ?
ida_get_new_above+0xa5/0x1c0
Oct  8 07:28:07 tiare kernel:  [<ffffffff810b86f3>] ? iput+0x23/0x60
Oct  8 07:28:07 tiare kernel:  [<ffffffff810ff373>] ?
sysfs_addrm_finish+0x63/0x250
Oct  8 07:28:07 tiare kernel:  [<ffffffff810fe800>] ?
sysfs_ilookup_test+0x0/0x10
Oct  8 07:28:07 tiare kernel:  [<ffffffff810feb2e>] ?
__sysfs_add_one+0x6e/0xa0
Oct  8 07:28:07 tiare kernel:  [<ffffffffa000a921>] ?
usb_match_one_id+0x31/0xb0 [usbcore]
Oct  8 07:28:07 tiare kernel:  [<ffffffffa000c0c1>] ?
usb_probe_interface+0xa1/0x150 [usbcore]
Oct  8 07:28:07 tiare kernel:  [<ffffffff811ec67c>] ?
driver_probe_device+0x7c/0x160
Oct  8 07:28:07 tiare kernel:  [<ffffffff811ec9ab>] ?
__driver_attach+0x8b/0x90
Oct  8 07:28:07 tiare kernel:  [<ffffffff811ec920>] ?
__driver_attach+0x0/0x90
Oct  8 07:28:07 tiare kernel:  [<ffffffff811eba7d>] ?
bus_for_each_dev+0x4d/0x80
Oct  8 07:28:07 tiare kernel:  [<ffffffff811ec25f>] ?
bus_add_driver+0x1af/0x240
Oct  8 07:28:07 tiare kernel:  [<ffffffff811ecad0>] ?
driver_register+0x60/0x140
Oct  8 07:28:07 tiare kernel:  [<ffffffffa000b1b9>] ?
usb_register_driver+0xa9/0x120 [usbcore]
Oct  8 07:28:07 tiare kernel:  [<ffffffffa010f043>] ?
edgeport_init+0x43/0x75 [io_ti]
Oct  8 07:28:07 tiare kernel:  [<ffffffffa010f000>] ?
edgeport_init+0x0/0x75 [io_ti]
Oct  8 07:28:07 tiare kernel:  [<ffffffff81009036>] ?
do_one_initcall+0x26/0x170
Oct  8 07:28:07 tiare kernel:  [<ffffffff810654f8>] ?
sys_init_module+0xe8/0x230
Oct  8 07:28:07 tiare kernel:  [<ffffffff8100b1eb>] ?
system_call_fastpath+0x16/0x1b
Oct  8 07:28:07 tiare kernel: Code: 54 49 89 fc 8b 3d f1 84 00 00 55 85
ff 53 75 51 41 80 7c 24 1a 00 74 38 31 ed 0f 1f 44 00 00 49 8b 44 ec 20
48 8b 98 18 02 00 00 <48> 8b bb 80 00 00 00 e8 28 ec ff ff 48 89 df e8
a0 30 df e0 41
Oct  8 07:28:07 tiare kernel: RIP  [<ffffffffa02acaac>]
edge_release+0x2c/0x80 [io_ti]
Oct  8 07:28:07 tiare kernel:  RSP <ffff88011851fbe8>
Oct  8 07:28:07 tiare kernel: CR2: 0000000000000080
Oct  8 07:28:07 tiare kernel: ---[ end trace 512d2a7ed9d26e9c ]---
Oct  8 07:28:07 tiare kernel: usb 5-2: USB disconnect, address 2
Oct  8 07:28:07 tiare kernel: usb 5-2.1: USB disconnect, address 3

kernel 2.6.32-rc3
- -------------------------------------------------------------------------------------------
Oct  8 08:02:36 q30 klogd: usb 1-1: new full speed USB device using
uhci_hcd and address 2
Oct  8 08:02:36 q30 klogd: usb 1-1: New USB device found, idVendor=1608,
idProduct=0288
Oct  8 08:02:36 q30 klogd: usb 1-1: New USB device strings: Mfr=0,
Product=0, SerialNumber=0
Oct  8 08:02:36 q30 klogd: usb 1-1: configuration #1 chosen from 1 choice
Oct  8 08:02:36 q30 klogd: hub 1-1:1.0: USB hub found
Oct  8 08:02:36 q30 klogd: hub 1-1:1.0: 1 port detected
Oct  8 08:02:36 q30 klogd: usb 1-1.1: new full speed USB device using
uhci_hcd and address 3
Oct  8 08:02:36 q30 klogd: usb 1-1.1: New USB device found,
idVendor=1608, idProduct=021d
Oct  8 08:02:36 q30 klogd: usb 1-1.1: New USB device strings: Mfr=0,
Product=0, SerialNumber=0
Oct  8 08:02:36 q30 klogd: usb 1-1.1: configuration #1 chosen from 1 choice
Oct  8 08:02:37 q30 klogd: usbcore: registered new interface driver
usbserial
Oct  8 08:02:37 q30 klogd: USB Serial support registered for generic
Oct  8 08:02:37 q30 klogd: usbcore: registered new interface driver
usbserial_generic
Oct  8 08:02:37 q30 klogd: usbserial: USB Serial Driver core
Oct  8 08:02:37 q30 klogd: USB Serial support registered for Edgeport TI
1 port adapter
Oct  8 08:02:37 q30 klogd: USB Serial support registered for Edgeport TI
2 port adapter
Oct  8 08:02:37 q30 klogd: io_ti 1-1.1:1.0: Edgeport TI 2 port adapter
converter detected
Oct  8 08:02:37 q30 klogd: usb 1-1.1: firmware: requesting
edgeport/down3.bin
Oct  8 08:02:38 q30 klogd: BUG: unable to handle kernel NULL pointer
dereference at 00000064
Oct  8 08:02:38 q30 klogd: IP: [<f88dcd12>] edge_release+0x35/0x57 [io_ti]
Oct  8 08:02:38 q30 klogd: *pde = 00000000
Oct  8 08:02:38 q30 klogd: Oops: 0000 [#1] PREEMPT
Oct  8 08:02:38 q30 klogd: last sysfs file:
/sys/devices/pci0000:00/0000:00:1d.0/usb1/1-1/1-1.1/firmware/1-1.1/loading
Oct  8 08:02:38 q30 klogd: Modules linked in: io_ti(+) usbserial tun
michael_mic lib80211_crypt_tkip aes_i586 aes_generic lib80211_crypt_ccmp
af_packet arc4
ecb cryptomgr crypto_hash aead pcompress crypto_blkcipher crypto_algapi
lib80211_crypt_wep ip_tables x_tables binfmt_misc loop
cpufreq_conservative cpufreq_p
owersave acpi_cpufreq nvram pcmcia snd_intel8x0 snd_seq_dummy
snd_intel8x0m snd_ac97_codec ac97_bus snd_seq_oss snd_seq_midi_event
snd_seq snd_seq_device ipw
2200 snd_pcm_oss libipw snd_pcm yenta_socket firewire_ohci snd_timer
cfg80211 rsrc_nonstatic rtc_cmos snd_mixer_oss firewire_core battery ac
pcmcia_core crc_
itu_t snd lib80211 processor thermal evdev joydev pcspkr i2c_i801
snd_page_alloc ehci_hcd uhci_hcd sg
Oct  8 08:02:38 q30 klogd:
Oct  8 08:02:38 q30 klogd: Pid: 3906, comm: modprobe Tainted: G        W
~ (2.6.32-rc3-sysnux #1) SQ30
Oct  8 08:02:38 q30 klogd: EIP: 0060:[<f88dcd12>] EFLAGS: 00010246 CPU: 0
Oct  8 08:02:38 q30 klogd: EIP is at edge_release+0x35/0x57 [io_ti]
Oct  8 08:02:38 q30 klogd: EAX: 00000000 EBX: 00000000 ECX: f6474ee0
EDX: f88de778
Oct  8 08:02:38 q30 klogd: ESI: f64a9660 EDI: 00000001 EBP: 00000000
ESP: f68b8df4
Oct  8 08:02:38 q30 klogd:  DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 0068
Oct  8 08:02:38 q30 klogd: Process modprobe (pid: 3906, ti=f68b8000
task=f73126c0 task.ti=f68b8000)
Oct  8 08:02:38 q30 klogd: Stack:
Oct  8 08:02:38 q30 klogd:  f64a9660 00000000 f64a9660 f887be6c f64a9694
f887bddf c10d2878 fffffffb
Oct  8 08:02:38 q30 klogd: <0> f88de778 f887cc22 f6b81d00 f736a800
f88de778 00000000 00000000 00000000
Oct  8 08:02:38 q30 klogd: <0> 00000001 00000002 f64a9660 00000009
f6b81d1c 00000000 00000001 c10d14e4
Oct  8 08:02:38 q30 klogd: Call Trace:
Oct  8 08:02:38 q30 klogd:  [<f887be6c>] ? destroy_serial+0x8d/0xc0
[usbserial]
Oct  8 08:02:38 q30 klogd:  [<f887bddf>] ? destroy_serial+0x0/0xc0
[usbserial]
Oct  8 08:02:38 q30 klogd:  [<c10d2878>] ? kref_put+0x35/0x3f
Oct  8 08:02:38 q30 klogd:  [<f887cc22>] ? usb_serial_probe+0xbc8/0xbeb
[usbserial]
Oct  8 08:02:38 q30 klogd:  [<c10d14e4>] ? ida_get_new_above+0x159/0x16e
Oct  8 08:02:38 q30 klogd:  [<c10d14e4>] ? ida_get_new_above+0x159/0x16e
Oct  8 08:02:38 q30 klogd:  [<c1076bae>] ? find_inode+0x1b/0x56
Oct  8 08:02:38 q30 klogd:  [<c10a45c7>] ? sysfs_ilookup_test+0x0/0xd
Oct  8 08:02:38 q30 klogd:  [<c1076a0a>] ? wait_on_inode+0x16/0x18
Oct  8 08:02:38 q30 klogd:  [<c1076c49>] ? ifind+0x60/0x8c
Oct  8 08:02:38 q30 klogd:  [<c1076841>] ? iput+0x21/0x4a
Oct  8 08:02:38 q30 klogd:  [<c10a4b75>] ? sysfs_addrm_finish+0x4a/0x202
Oct  8 08:02:38 q30 klogd:  [<c10a4866>] ? __sysfs_add_one+0x3d/0x44
Oct  8 08:02:38 q30 klogd:  [<c10a48ae>] ? sysfs_add_one+0xd/0x70
Oct  8 08:02:38 q30 klogd:  [<c10a54de>] ? sysfs_do_create_link+0xcd/0xeb
Oct  8 08:02:38 q30 klogd:  [<c119a48b>] ? usb_match_one_id+0x19/0x6e
Oct  8 08:02:38 q30 klogd:  [<c119b436>] ? usb_probe_interface+0xda/0x10c
Oct  8 08:02:38 q30 klogd:  [<c1163167>] ? driver_probe_device+0x7a/0xe9
Oct  8 08:02:38 q30 klogd:  [<c1163211>] ? __driver_attach+0x3b/0x56
Oct  8 08:02:38 q30 klogd:  [<c1162a5b>] ? bus_for_each_dev+0x34/0x54
Oct  8 08:02:38 q30 klogd:  [<c116304a>] ? driver_attach+0x11/0x13
Oct  8 08:02:38 q30 klogd:  [<c11631d6>] ? __driver_attach+0x0/0x56
Oct  8 08:02:38 q30 klogd:  [<c11626ae>] ? bus_add_driver+0x99/0x1b5
Oct  8 08:02:38 q30 klogd:  [<c11634d7>] ? driver_register+0x77/0xcc
Oct  8 08:02:38 q30 klogd:  [<c119af7e>] ? usb_register_driver+0x56/0xad
Oct  8 08:02:38 q30 klogd:  [<f888d000>] ? edgeport_init+0x0/0x60 [io_ti]
Oct  8 08:02:38 q30 klogd:  [<f888d035>] ? edgeport_init+0x35/0x60 [io_ti]
Oct  8 08:02:38 q30 klogd:  [<c100112b>] ? do_one_initcall+0x43/0x11f
Oct  8 08:02:38 q30 klogd:  [<c103c05f>] ? sys_init_module+0xa7/0x1dc
Oct  8 08:02:38 q30 klogd:  [<c1002874>] ? sysenter_do_call+0x12/0x26
Oct  8 08:02:38 q30 klogd: Code: c6 53 74 17 68 3c e5 8d f8 68 78 cd 8d
f8 68 6c d6 8d f8 e8 9f fe 73 c8 83 c4 0c 31 ff eb 1b 8b 44 be 14 47 e8
01 c4 ff ff 89 c3 <8b> 40 64 e8 9f cf ff ff 89 d8 e8 4f 7a 78 c8 0f b6
46 0e 39 c7
Oct  8 08:02:38 q30 klogd: EIP: [<f88dcd12>] edge_release+0x35/0x57
[io_ti] SS:ESP 0068:f68b8df4
Oct  8 08:02:38 q30 klogd: CR2: 0000000000000064
Oct  8 08:02:38 q30 udevd-event[3904]: '/sbin/modprobe -b
usb:v1608p021Dd0100dcFFdsc00dp00icFFisc00ip00' abnormal exit
Oct  8 08:02:38 q30 klogd: usb 1-1: USB disconnect, address 2
Oct  8 08:02:38 q30 klogd: usb 1-1.1: USB disconnect, address 3
Oct  8 08:02:38 q30 klogd: ---[ end trace 4eaa2a86a8e2da24 ]---



Thanks,
- --
Jean-Denis Girard

SysNux                  Systèmes  Linux  en Polynésie française
http://www.sysnux.pf/   Tél: +689 50 10 40 / GSM: +689 79 75 27
-----BEGIN PGP SIGNATURE-----

iEYEARECAAYFAkrOKvUACgkQuu7Rv+oOo/hGeACdGkBZDZijEwV22KrWKh3PPxdM
oTIAn0fsagkckysch3sX2EJA+uSXKJmu
=NecQ
-----END PGP SIGNATURE-----
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux