When I remove the device, ftdi_sio_port_remove() calls usb_set_serial_port_data(port, NULL); When I then close minicom, it dereferences that NULL pointer: usb 4-2: USB disconnect, address 4 ftdi_sio ttyUSB0: FTDI USB Serial Device converter now disconnected from ttyUSB0 ftdi_sio 4-2:1.0: device disconnected BUG: unable to handle kernel NULL pointer dereference at 0000000000000088 IP: [<ffffffff8105260b>] lock_timer_base+0x16/0x52 PGD 1230b2067 PUD 10cd20067 PMD 0 Oops: 0000 [#1] SMP last sysfs file: /sys/devices/LNXSYSTM:00/device:00/PNP0C0A:00/power_supply/BAT0/voltage_now CPU 0 Modules linked in: tun fuse hidp rfcomm bridge stp llc bnep sco l2cap ppdev parport_pc parport sunrpc ipv6 cpufreq_ondemand acpi_cpufreq freq_table vfat fat dm_multipath kvm_intel kvm uinput snd_hda_codec_realtek arc4 ecb firewire_ohci firewire_core crc_itu_t ftdi_sio btusb bluetooth bcm5974 usbserial usb_storage uvcvideo videodev v4l1_compat v4l2_compat_ioctl32 snd_hda_intel snd_hda_codec snd_hwdep joydev snd_pcm snd_timer snd soundcore snd_page_alloc video output applesmc hwmon iTCO_wdt iTCO_vendor_support i2c_i801 pcspkr sky2 iwlagn iwlcore lib80211 mac80211 cfg80211 input_polldev mbp_nvidia_bl ata_generic pata_acpi nouveau drm i2c_algo_bit i2c_core [last unloaded: microcode] Pid: 4769, comm: minicom Not tainted 2.6.29.3-140.fc11.x86_64 #1 MacBookPro4,1 RIP: 0010:[<ffffffff8105260b>] [<ffffffff8105260b>] lock_timer_base+0x16/0x52 RSP: 0018:ffff88010a469ac8 EFLAGS: 00010286 RAX: ffff8801111489c0 RBX: 0000000000000060 RCX: 0000000000000000 RDX: 0000000100000000 RSI: ffff88010a469b00 RDI: 0000000000000060 RBP: ffff88010a469ae8 R08: ffff88010cd9a780 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000060 R13: ffff88010a469b00 R14: ffff8801111489c0 R15: ffff880123108090 FS: 00007f00978f36f0(0000) GS:ffffffff817b7000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000088 CR3: 000000010cc6e000 CR4: 00000000000026e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 Process minicom (pid: 4769, threadinfo ffff88010a468000, task ffff880117881700) Stack: 0000000000000060 00000000ffffffff 0000000000000400 ffff8801111489c0 ffff88010a469b18 ffffffff81052667 0000004b17881e00 0000000000000246 0000000000000060 0000000000000000 ffff88010a469b38 ffffffff810526c6 Call Trace: [<ffffffff81052667>] try_to_del_timer_sync+0x20/0x66 [<ffffffff810526c6>] del_timer_sync+0x19/0x26 [<ffffffffa02984c3>] ftdi_close+0xf9/0x120 [ftdi_sio] [<ffffffffa0265ccf>] serial_close+0x9d/0x156 [usbserial] [<ffffffff8122c152>] tty_release_dev+0x198/0x49a [<ffffffff813aa44b>] ? mutex_lock+0x27/0x38 [<ffffffffa0265c2e>] ? usb_serial_put+0x39/0x3d [usbserial] [<ffffffffa0266480>] ? serial_open+0x1fd/0x211 [usbserial] [<ffffffff813ab632>] ? _spin_lock+0xe/0x11 [<ffffffff8122c9ef>] tty_open+0x32c/0x431 [<ffffffff810d7cdf>] chrdev_open+0x152/0x171 [<ffffffff8118679c>] ? selinux_dentry_open+0xe7/0xf0 [<ffffffff810d7b8d>] ? chrdev_open+0x0/0x171 [<ffffffff810d385e>] __dentry_open+0x143/0x273 [<ffffffff810d3a5e>] nameidata_to_filp+0x42/0x53 [<ffffffff810df0f9>] do_filp_open+0x3fd/0x7b8 [<ffffffff813ab87c>] ? _spin_unlock_irqrestore+0x2c/0x42 [<ffffffff8105f892>] ? __hrtimer_start_range_ns+0x226/0x238 [<ffffffff811b9592>] ? might_fault+0x1f/0x21 [<ffffffff811b9691>] ? __strncpy_from_user+0x1e/0x49 [<ffffffff810e8468>] ? alloc_fd+0x11b/0x12d [<ffffffff813ab4ed>] ? trace_hardirqs_off_thunk+0x3a/0x6c [<ffffffff810d364e>] do_sys_open+0x59/0xda [<ffffffff810d3702>] sys_open+0x20/0x22 [<ffffffff8101133a>] system_call_fastpath+0x16/0x1b Code: 4c 89 e3 48 83 c4 38 48 89 d8 5b 41 5c 41 5d 41 5e 41 5f c9 c3 55 48 89 e5 41 56 41 55 41 54 53 0f 1f 44 00 00 49 89 fc 49 89 f5 <4d> 8b 74 24 28 4c 89 f3 48 83 e3 fe 74 2a 48 89 df e8 79 93 35 RIP [<ffffffff8105260b>] lock_timer_base+0x16/0x52 RSP <ffff88010a469ac8> CR2: 0000000000000088 ---[ end trace a70d45122ede0b51 ]--- -- David Woodhouse Open Source Technology Centre David.Woodhouse@xxxxxxxxx Intel Corporation -- 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