1. 21 Jan, 2011 4 commits
    • Max Vozeler's avatar
      staging: usbip: vhci: refuse to enqueue for dead connections · 6d212153
      Max Vozeler authored
      There can be requests to enqueue URBs while we are shutting
      down a connection.
      Signed-off-by: default avatarMax Vozeler <max@vozeler.com>
      Tested-by: default avatarMark Wehby <MWehby@luxotticaRetail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      6d212153
    • Max Vozeler's avatar
      staging: usbip: vhci: give back URBs from in-flight unlink requests · b92a5e23
      Max Vozeler authored
      If we never received a RET_UNLINK because the TCP
      connection broke the pending URBs still need to be
      unlinked and given back.
      
      Previously processes would be stuck trying to kill
      the URB even after the device was detached.
      Signed-off-by: default avatarMax Vozeler <max@vozeler.com>
      Tested-by: default avatarMark Wehby <MWehby@luxotticaRetail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      b92a5e23
    • Max Vozeler's avatar
      staging: usbip: vhci: update reference count for usb_device · 7606ee8a
      Max Vozeler authored
      This fixes an oops observed when reading status during
      removal of a device:
      
      [ 1706.648285] general protection fault: 0000 [#1] SMP
      [ 1706.648294] last sysfs file: /sys/devices/platform/vhci_hcd/status
      [ 1706.648297] CPU 1
      [ 1706.648300] Modules linked in: binfmt_misc microcode fuse loop vhci_hcd(N) usbip(N) usbcore usbip_common_mod(N) rtc_core rtc_lib joydev dm_mirror dm_region_hash dm_log linear dm_snapshot xennet dm_mod ext3 mbcache jbd processor thermal_sys hwmon xenblk cdrom
      [ 1706.648324] Supported: Yes
      [ 1706.648327] Pid: 10422, comm: usbip Tainted: G          N  2.6.32.12-0.7-xen #1
      [ 1706.648330] RIP: e030:[<ffffffff801b10d5>]  [<ffffffff801b10d5>] strnlen+0x5/0x40
      [ 1706.648340] RSP: e02b:ffff8800a994dd30  EFLAGS: 00010286
      [ 1706.648343] RAX: ffffffff80481ec1 RBX: 0000000000000000 RCX: 0000000000000002
      [ 1706.648347] RDX: 00200d1d4f1c001c RSI: ffffffffffffffff RDI: 00200d1d4f1c001c
      [ 1706.648350] RBP: ffff880129a1c0aa R08: ffffffffa01901c4 R09: 0000000000000006
      [ 1706.648353] R10: 0000000000000000 R11: 0000000000000000 R12: ffff8800a9a1c0ab
      [ 1706.648357] R13: 00200d1d4f1c001c R14: 00000000ffffffff R15: ffff880129a1c0aa
      [ 1706.648363] FS:  00007f2f2e9ca700(0000) GS:ffff880001018000(0000) knlGS:0000000000000000
      [ 1706.648367] CS:  e033 DS: 0000 ES: 0000 CR0: 0000000080050033
      [ 1706.648370] CR2: 000000000071b048 CR3: 00000000b4b68000 CR4: 0000000000002660
      [ 1706.648374] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      [ 1706.648378] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
      [ 1706.648381] Process usbip (pid: 10422, threadinfo ffff8800a994c000, task ffff88007b170200)
      [ 1706.648385] Stack:
      [ 1706.648387]  ffffffff801b28c9 0000000000000002 ffffffffa01901c4 ffff8800a9a1c0ab
      [ 1706.648391] <0> ffffffffa01901c6 ffff8800a994de08 ffffffff801b339b 0000000000000004
      [ 1706.648397] <0> 0000000affffffff ffffffffffffffff 00000000000067c0 0000000000000000
      [ 1706.648404] Call Trace:
      [ 1706.648413]  [<ffffffff801b28c9>] string+0x39/0xe0
      [ 1706.648419]  [<ffffffff801b339b>] vsnprintf+0x1eb/0x620
      [ 1706.648423]  [<ffffffff801b3813>] sprintf+0x43/0x50
      [ 1706.648429]  [<ffffffffa018d719>] show_status+0x1b9/0x220 [vhci_hcd]
      [ 1706.648438]  [<ffffffff8024a2b7>] dev_attr_show+0x27/0x60
      [ 1706.648445]  [<ffffffff80144821>] sysfs_read_file+0x101/0x1d0
      [ 1706.648451]  [<ffffffff800da4a7>] vfs_read+0xc7/0x130
      [ 1706.648457]  [<ffffffff800da613>] sys_read+0x53/0xa0
      [ 1706.648462]  [<ffffffff80007458>] system_call_fastpath+0x16/0x1b
      [ 1706.648468]  [<00007f2f2de40f30>] 0x7f2f2de40f30
      [ 1706.648470] Code: 66 0f 1f 44 00 00 48 83 c2 01 80 3a 00 75 f7 48 89 d0 48 29 f8 f3 c3 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 48 85 f6 74 29 <80> 3f 00 74 24 48 8d 56 ff 48 89 f8 eb 0e 0f 1f 44 00 00 48 83
      [ 1706.648507] RIP  [<ffffffff801b10d5>] strnlen+0x5/0x40
      [ 1706.648511]  RSP <ffff8800a994dd30>
      [ 1706.649575] ---[ end trace b4eb72bf2e149593 ]---
      Signed-off-by: default avatarMax Vozeler <max@vozeler.com>
      Tested-by: default avatarMark Wehby <MWehby@luxotticaRetail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      7606ee8a
    • Max Vozeler's avatar
      staging: usbip: stub: update refcounts for devices and interfaces · 2d8f4595
      Max Vozeler authored
      The stub driver expects to access the usb interface
      and usb device structures even if the device has been
      disconnected in the meantime.
      
      This change gets a reference to them in the stub probe
      function using usb_get_intf()/usb_get_dev() and drops them
      in the disconnect function.
      
      This fixes an oops observed with a Logic Controls Line
      display (0fa8:a030) which disconnects itself when it is
      reset:
      
      [ 1348.562274] BUG: unable to handle kernel paging request at 5f7433e5
      [ 1348.562327] IP: [<c0393b02>] usb_lock_device_for_reset+0x22/0xd0
      [ 1348.562374] *pde = 00000000
      [ 1348.562397] Oops: 0000 [#1]
      [ 1348.562418] last sysfs file: /sys/devices/pci0000:00/0000:00:10.2/usb4/4-1/bConfigurationValue
      [ 1348.562454] Modules linked in: usbip vhci_hcd usbip_common_mod fbcon tileblit font bitblit softcursor serio_raw uvesafb pcspkr via_rng snd_via82xx gameport snd_ac97_codec ac97_bus snd_pcm_oss snd_mixer_oss snd_pcm snd_page_alloc snd_mpu401_uart snd_rawmidi snd_seq_oss snd_seq_midi_event snd_seq snd_timer snd_seq_device snd usbhid hid via_rhine soundcore mii igel_flash aufs pata_via
      [ 1348.562649]
      [ 1348.562670] Pid: 2855, comm: usbip_eh Not tainted (2.6.32 #23.37-ud-r113) M300C
      [ 1348.562704] EIP: 0060:[<c0393b02>] EFLAGS: 00010216 CPU: 0
      [ 1348.562734] EIP is at usb_lock_device_for_reset+0x22/0xd0
      [ 1348.562762] EAX: 5f7433cd EBX: 5f7433cd ECX: de293a5c EDX: dd326a00
      [ 1348.562793] ESI: 5f7433cd EDI: 000400f6 EBP: cf43ff48 ESP: cf43ff38
      [ 1348.562824]  DS: 007b ES: 007b FS: 0000 GS: 00e0 SS: 0068
      [ 1348.562854] Process usbip_eh (pid: 2855, ti=cf43e000 task=d2c7f230 task.ti=cf43e000)
      [ 1348.562884] Stack:
      [ 1348.562900]  d6ec9960 de2939cc 5f7433cd 5f743431 cf43ff70 df8fd32f de2939cc d2c7f230
      [ 1348.562940] <0> cf43ff70 00000282 00000282 de2939cc d2c7f230 d2c7f230 cf43ffa8 df84416d
      [ 1348.562987] <0> cf43ff88 d2c7f230 de293a24 d2c7f230 00000000 d2c7f230 c014e760 cf43ff94
      [ 1348.563042] Call Trace:
      [ 1348.563073]  [<df8fd32f>] ? stub_device_reset+0x3f/0x110 [usbip]
      [ 1348.563114]  [<df84416d>] ? event_handler_loop+0xcd/0xe8 [usbip_common_mod]
      [ 1348.563156]  [<c014e760>] ? autoremove_wake_function+0x0/0x50
      [ 1348.563193]  [<df843d80>] ? usbip_thread+0x0/0x60 [usbip_common_mod]
      [ 1348.563230]  [<df843dd1>] ? usbip_thread+0x51/0x60 [usbip_common_mod]
      [ 1348.563265]  [<c014e374>] ? kthread+0x74/0x80
      [ 1348.563294]  [<c014e300>] ? kthread+0x0/0x80
      [ 1348.563326]  [<c0103c47>] ? kernel_thread_helper+0x7/0x10
      [ 1348.563351] Code: 00 e8 73 4d 00 00 5d c3 90 55 89 e5 83 ec 10 89 5d f4 89 75 f8 89 7d fc 0f 1f 44 00 00 8b 3d c0 2e 67 c0 81 c7 fa 00 00 00 89 c3 <8b> 40 18 89 d6 85 c0 75 15 b8 ed ff ff ff 8b 5d f4 8b 75 f8 8b
      [ 1348.563528] EIP: [<c0393b02>] usb_lock_device_for_reset+0x22/0xd0 SS:ESP 0068:cf43ff38
      [ 1348.563570] CR2: 000000005f7433e5
      [ 1348.563593] ---[ end trace 9c3f1e3a2e5299d9 ]---
      Signed-off-by: default avatarMax Vozeler <max@vozeler.com>
      Tested-by: default avatarMark Wehby <MWehby@luxotticaRetail.com>
      Tested-by: default avatarSteven Harms <sharms@luxotticaRetail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      2d8f4595
  2. 20 Jan, 2011 15 commits
  3. 18 Jan, 2011 21 commits