1. 26 8月, 2014 2 次提交
  2. 24 5月, 2014 1 次提交
  3. 02 4月, 2014 1 次提交
  4. 11 3月, 2014 1 次提交
  5. 09 3月, 2014 3 次提交
  6. 28 2月, 2014 1 次提交
  7. 08 2月, 2014 1 次提交
    • V
      staging: usbip: convert usbip-host driver to usb_device_driver · b7945b77
      Valentina Manea 提交于
      This driver was previously an interface driver. Since USB/IP
      exports a whole device, not just an interface, it would make
      sense to be a device driver.
      
      This patch also modifies the way userspace sees and uses a
      shared device:
      
      * the usbip_status file is no longer created for interface 0, but for
      the whole device (such as
      /sys/devices/pci0000:00/0000:00:01.2/usb1/1-1/usbip_status).
      * per interface information, such as interface class or protocol, is
      no longer sent/received; only device specific information is
      transmitted.
      * since the driver was moved one level below in the USB architecture,
      there is no need to bind/unbind each interface, just the device as a
      whole.
      Signed-off-by: NValentina Manea <valentina.manea.m@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      b7945b77
  8. 26 9月, 2013 1 次提交
  9. 27 8月, 2013 1 次提交
  10. 06 4月, 2013 3 次提交
  11. 12 3月, 2013 1 次提交
  12. 16 2月, 2013 1 次提交
  13. 12 2月, 2013 1 次提交
  14. 23 1月, 2013 1 次提交
  15. 14 11月, 2012 1 次提交
  16. 23 10月, 2012 2 次提交
  17. 21 9月, 2012 1 次提交
    • N
      staging: usbip: stub_dev: Fixed oops during removal of usbip_host · b7caecb8
      navin 提交于
      stub_shutdown_connection() should set kernel thread pointers to NULL after killing them.
      so that at the time of usbip_host removal stub_shutdown_connection() doesn't try to kill kernel threads
      which are already killed.
      
      [ 1504.312158] BUG: unable to handle kernel NULL pointer dereference at           (null)
      [ 1504.315833] IP: [<ffffffff8108186f>] exit_creds+0x1f/0x70
      [ 1504.317688] PGD 41f1c067 PUD 41d0f067 PMD 0
      [ 1504.319611] Oops: 0000 [#2] SMP
      [ 1504.321480] Modules linked in: vhci_hcd(O) usbip_host(O-) usbip_core(O) uas usb_storage joydev parport_pc bnep rfcomm ppdev binfmt_misc
      snd_hda_codec_hdmi snd_hda_codec_conexant snd_hda_intel snd_hda_codec snd_hwdep snd_pcm snd_seq_midi arc4 snd_rawmidi snd_seq_midi_event
      snd_seq ath9k mac80211 ath9k_common ath9k_hw snd_timer snd_seq_device snd ath i915 drm_kms_helper drm psmouse cfg80211 coretemp soundcore
      lpc_ich i2c_algo_bit snd_page_alloc video intel_ips wmi btusb mac_hid bluetooth ideapad_laptop lp sparse_keymap serio_raw mei microcode parport r8169
      [ 1504.329666] CPU 1
      [ 1504.329687] Pid: 2434, comm: usbip_eh Tainted: G      D    O 3.6.0-rc31+ #2 LENOVO 20042                           /Base Board Product Name
      [ 1504.333502] RIP: 0010:[<ffffffff8108186f>]  [<ffffffff8108186f>] exit_creds+0x1f/0x70
      [ 1504.335371] RSP: 0018:ffff880041c7fdd0  EFLAGS: 00010282
      [ 1504.337226] RAX: 0000000000000000 RBX: ffff880041c2db40 RCX: ffff880041e4ae50
      [ 1504.339101] RDX: 0000000000000044 RSI: 0000000000000286 RDI: 0000000000000000
      [ 1504.341027] RBP: ffff880041c7fde0 R08: ffff880041c7e000 R09: 0000000000000000
      [ 1504.342934] R10: 0000000000000001 R11: 0000000000000000 R12: 0000000000000000
      [ 1504.344840] R13: 0000000000000000 R14: ffff88004d448000 R15: ffff880041c7fea0
      [ 1504.346743] FS:  0000000000000000(0000) GS:ffff880077440000(0000) knlGS:0000000000000000
      [ 1504.348671] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
      [ 1504.350612] CR2: 0000000000000000 CR3: 0000000041d0d000 CR4: 00000000000007e0
      [ 1504.352723] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      [ 1504.354734] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
      [ 1504.356737] Process usbip_eh (pid: 2434, threadinfo ffff880041c7e000, task ffff88004d448000)
      [ 1504.358711] Stack:
      [ 1504.360635]  ffff880041c7fde0 ffff880041c2db40 ffff880041c7fe00 ffffffff81052aaa
      [ 1504.362589]  ffff880041c2db40 0000000000000000 ffff880041c7fe30 ffffffff8107a148
      [ 1504.364539]  ffff880041e4ae10 ffff880041e4ae00 ffff88004d448000 ffff88004d448000
      [ 1504.366470] Call Trace:
      [ 1504.368368]  [<ffffffff81052aaa>] __put_task_struct+0x4a/0x140
      [ 1504.370307]  [<ffffffff8107a148>] kthread_stop+0x108/0x110
      [ 1504.370312]  [<ffffffffa040da4e>] stub_shutdown_connection+0x3e/0x1b0 [usbip_host]
      [ 1504.370315]  [<ffffffffa03fd920>] event_handler_loop+0x70/0x140 [usbip_core]
      [ 1504.370318]  [<ffffffff8107ad30>] ? add_wait_queue+0x60/0x60
      [ 1504.370320]  [<ffffffffa03fd8b0>] ? usbip_stop_eh+0x30/0x30 [usbip_core]
      [ 1504.370322]  [<ffffffff8107a453>] kthread+0x93/0xa0
      [ 1504.370327]  [<ffffffff81670e84>] kernel_thread_helper+0x4/0x10
      [ 1504.370330]  [<ffffffff8107a3c0>] ? flush_kthread_worker+0xb0/0xb0
      [ 1504.370332]  [<ffffffff81670e80>] ? gs_change+0x13/0x13
      [ 1504.370351] Code: 0b 0f 0b 66 0f 1f 84 00 00 00 00 00 55 48 89 e5 53 48 83 ec 08 66 66 66 66 90 48 8b 87 58 04 00 00 48 89 fb 48 8b bf 50 04 00 00
      <8b> 00 48 c7 83 50 04 00 00 00 00 00 00 f0 ff 0f 0f 94 c0 84 c0
      [ 1504.370353] RIP  [<ffffffff8108186f>] exit_creds+0x1f/0x70
      [ 1504.370353]  RSP <ffff880041c7fdd0>
      [ 1504.370354] CR2: 0000000000000000
      [ 1504.401376] ---[ end trace 1971ce612a16727a ]---
      Signed-off-by: Nnavin patidar <navinp@cdac.in>
      Acked-by: NDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      b7caecb8
  18. 11 4月, 2012 1 次提交
    • O
      staging: usbip: fix the usage of kthread_stop() · ba46ce30
      Oleg Nesterov 提交于
      stub_shutdown_connection() and vhci_shutdown_connection() use
      task_is_dead() before kthread_stop(). This buys nothing and wrong.
      kthread_stop() is fine even if this thread is dead. However, if it
      is dead nothing protects this task_struct, we shouldn't touch this
      memory.
      
      Change the code to do the necessary get_task_struct/put_task_struct.
      
      This patch assumes that
      
      	- xxx_shutdown_connection() is always called, so we can't
      	  leak the task_struct.
      
      	- kthread_stop_put() can't be called twice on the same task.
      Signed-off-by: NOleg Nesterov <oleg@redhat.com>
      Cc: Tobias Klauser <tklauser@distanz.ch>
      Cc: Matt Mooney <mfm@muteddisk.com>,
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      ba46ce30
  19. 25 2月, 2012 1 次提交
  20. 23 12月, 2011 1 次提交
  21. 26 8月, 2011 1 次提交
  22. 24 8月, 2011 2 次提交
  23. 06 7月, 2011 1 次提交
  24. 08 6月, 2011 3 次提交
  25. 20 5月, 2011 1 次提交
  26. 13 5月, 2011 1 次提交
  27. 07 5月, 2011 2 次提交
  28. 07 4月, 2011 1 次提交
  29. 03 3月, 2011 1 次提交
    • A
      staging/usbip: convert to kthread · 9720b4bc
      Arnd Bergmann 提交于
      usbip has its own infrastructure for managing kernel
      threads, similar to kthread. By changing it to use
      the standard functions, we can simplify the code
      and get rid of one of the last BKL users at the
      same time.
      
      Includes changes suggested by Max Vozeler.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Cc: Greg Kroah-Hartman <gregkh@suse.de>
      Cc: Takahiro Hirofuchi <hirofuchi@users.sourceforge.net>
      Cc: Max Vozeler <max@vozeler.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      9720b4bc
  30. 21 1月, 2011 1 次提交
    • M
      staging: usbip: stub: update refcounts for devices and interfaces · 2d8f4595
      Max Vozeler 提交于
      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: NMax Vozeler <max@vozeler.com>
      Tested-by: NMark Wehby <MWehby@luxotticaRetail.com>
      Tested-by: NSteven Harms <sharms@luxotticaRetail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      2d8f4595