Hi,
This line in the acm_probe routine

tty_register_device(acm_tty_driver, minor, &intf->dev);

causes the path to the tty created for each acm to be linked to
the usb interface. As long as the device is closed when it is
disconnected this is no problem but if the tty is open then the
tty deregistering is deferred. When the terminal is closed
the interface parent to the tty no longer exists and the kernel
crashes in kobject_get_path.

The solution is to not link the two things together and replace
&intf->dev above with NULL, see the attached patch.

I believe that someone else had the same problem a few days
ago.

/Brian
Signed-off-by: [EMAIL PROTECTED]

diff -u linux-2.6.11-bk7.clean/drivers/usb/class/cdc-acm.c 
linux-2.6.11-bk7/drivers/usb/class/cdc-acm.c
--- linux-2.6.11-bk7.clean/drivers/usb/class/cdc-acm.c  2005-03-12 
22:43:31.000000000 +0100
+++ linux-2.6.11-bk7/drivers/usb/class/cdc-acm.c        2005-03-13 
01:35:14.000000000 +0100
@@ -764,7 +764,7 @@
 
        usb_driver_claim_interface(&acm_driver, data_interface, acm);
 
-       tty_register_device(acm_tty_driver, minor, &intf->dev);
+       tty_register_device(acm_tty_driver, minor, NULL);
 
        acm_table[minor] = acm;
        usb_set_intfdata (intf, acm);

Reply via email to