Re: [BUG} usb-serial regression in 2.6.21-rc2-git3
From: Mark Lord
Date: Mon Mar 12 2007 - 12:51:07 EST
Mark Lord wrote:
Okay, from that part (above), the problem is obvious:
in that the "MCT U232 converter now disconnected" appears,
and then we continue to try and call the driver's method.. Oops!
The hack patch below "fixes" this, but it really just hides whatever
the real problem underneath was:
Signed-off-by: Mark Lord <mlord@xxxxxxxxx>
---
--- linux/include/linux/usb/serial.h.orig 2007-03-12
12:18:48.000000000 -0400
+++ linux/include/linux/usb/serial.h 2007-03-12 12:18:23.000000000 -0400
@@ -99,11 +99,19 @@
/* get and set the port private data pointer helper functions */
static inline void *usb_get_serial_port_data (struct usb_serial_port *port)
{
+ if (!port) {
+ WARN_ON(1);
+ return NULL;
+ }
return dev_get_drvdata(&port->dev);
}
static inline void usb_set_serial_port_data (struct usb_serial_port
*port, void *data)
{
+ if (!port) {
+ WARN_ON(1);
+ return;
+ }
dev_set_drvdata(&port->dev, data);
}
Mmmm.. and that same hack also prevents the Oops seen
when I leave ckermit running during suspend/resume(RAM),
giving me this BUG() report now instead:
12:29:51 kernel: pl2303 ttyUSB0: pl2303 converter now disconnected from ttyUSB0
12:29:51 kernel: BUG: at include/linux/usb/serial.h:103 usb_get_serial_port_data()
12:29:51 kernel: [<f8a03254>] pl2303_shutdown+0x95/0xb5 [pl2303]
12:29:51 kernel: [<f8a23ca1>] destroy_serial+0x89/0x122 [usbserial]
12:29:51 kernel: [<f8a23c18>] destroy_serial+0x0/0x122 [usbserial]
12:29:51 kernel: [kref_put+95/110] kref_put+0x5f/0x6e
12:29:51 kernel: [tty_fasync+60/180] tty_fasync+0x3c/0xb4
12:29:51 kernel: [release_dev+484/1496] release_dev+0x1e4/0x5d8
12:29:51 kernel: [find_get_page+21/69] find_get_page+0x15/0x45
12:29:51 kernel: [filemap_nopage+385/726] filemap_nopage+0x181/0x2d6
12:29:51 kernel: [pty_write+43/53] pty_write+0x2b/0x35
12:29:51 kernel: [getnstimeofday+48/216] getnstimeofday+0x30/0xd8
12:29:51 kernel: [rb_insert_color+74/173] rb_insert_color+0x4a/0xad
12:29:51 kernel: [enqueue_hrtimer+256/268] enqueue_hrtimer+0x100/0x10c
12:29:51 kernel: [tty_release+15/24] tty_release+0xf/0x18
12:29:51 kernel: [__fput+150/336] __fput+0x96/0x150
12:29:51 kernel: [filp_close+79/86] filp_close+0x4f/0x56
12:29:51 kernel: [sys_close+117/183] sys_close+0x75/0xb7
12:29:51 kernel: [sysenter_past_esp+95/133] sysenter_past_esp+0x5f/0x85
12:29:51 kernel: =======================
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/