1. 01 Apr, 2014 5 commits
  2. 29 Mar, 2014 2 commits
  3. 25 Mar, 2014 1 commit
    • Srinivas Pandruvada's avatar
      HID: hid-sensor-hub: fix sleeping function called from invalid context · f74346a0
      Srinivas Pandruvada authored
      Fix issue with the sleeping calling hid_hw_request under spinlock.
      When i2c is used as HID transport, this is calling kmalloc, which
      can sleep. So remove call to this function while under spinlock.
       [ 1067.021961] Call Trace:
       [ 1067.021970]  [<ffffffff8192f5f2>] dump_stack+0x4d/0x6f
       [ 1067.021976]  [<ffffffff811109f2>] __might_sleep+0xd2/0xf0
       [ 1067.021981]  [<ffffffff811ea15b>] __kmalloc+0xeb/0x200
       [ 1067.021989]  [<ffffffff816e0cb3>] ? hid_alloc_report_buf+0x23/0x30
       [ 1067.021993]  [<ffffffff816e0cb3>] hid_alloc_report_buf+0x23/0x30
       [ 1067.021997]  [<ffffffff816f4cb7>] i2c_hid_request+0x57/0x110
       [ 1067.022006]  [<ffffffffa02bc61c>] sensor_hub_input_attr_get_raw_value+0xbc/0x100 [hid_sensor_hub]
      Signed-off-by: default avatarSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
      Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
      f74346a0
  4. 14 Mar, 2014 7 commits
  5. 26 Feb, 2014 1 commit
    • Fernando Luis Vázquez Cao's avatar
      HID: hidraw: fix warning destroying hidraw device files after parent · 47587fc0
      Fernando Luis Vázquez Cao authored
      I noticed that after hot unplugging a Logitech unifying receiver
      (drivers/hid/hid-logitech-dj.c) the kernel would occasionally spew a
      stack trace similar to this:
      
      usb 1-1.1.2: USB disconnect, device number 7
      WARNING: CPU: 0 PID: 2865 at fs/sysfs/group.c:216 device_del+0x40/0x1b0()
      sysfs group ffffffff8187fa20 not found for kobject 'hidraw0'
      [...]
      CPU: 0 PID: 2865 Comm: upowerd Tainted: G        W 3.14.0-rc4 #7
      Hardware name: LENOVO 7783PN4/        , BIOS 9HKT43AUS 07/11/2011
       0000000000000009 ffffffff814cd684 ffff880427ccfdf8 ffffffff810616e7
       ffff88041ec61800 ffff880427ccfe48 ffff88041e444d80 ffff880426fab8e8
       ffff880429359960 ffffffff8106174c ffffffff81714b98 0000000000000028
      Call Trace:
       [<ffffffff814cd684>] ? dump_stack+0x41/0x51
       [<ffffffff810616e7>] ? warn_slowpath_common+0x77/0x90
       [<ffffffff8106174c>] ? warn_slowpath_fmt+0x4c/0x50
       [<ffffffff81374fd0>] ? device_del+0x40/0x1b0
       [<ffffffff8137516f>] ? device_unregister+0x2f/0x50
       [<ffffffff813751fa>] ? device_destroy+0x3a/0x40
       [<ffffffffa03ca245>] ? drop_ref+0x55/0x120 [hid]
       [<ffffffffa03ca3e6>] ? hidraw_release+0x96/0xb0 [hid]
       [<ffffffff811929da>] ? __fput+0xca/0x210
       [<ffffffff8107fe17>] ? task_work_run+0x97/0xd0
       [<ffffffff810139a9>] ? do_notify_resume+0x69/0xa0
       [<ffffffff814dbd22>] ? int_signal+0x12/0x17
      ---[ end trace 63f4a46f6566d737 ]---
      
      During device removal hid_disconnect() is called via hid_hw_stop() to
      stop the device and free all its resources, including the sysfs
      files. The problem is that if a user space process, such as upowerd,
      holds a reference to a hidraw file the corresponding sysfs files will
      be kept around (drop_ref() does not call device_destroy() if the open
      counter is not 0) and it will be usb_disconnect() who, by calling
      device_del() for the USB device, will indirectly remove the sysfs
      files of the hidraw device (sysfs_remove_dir() is recursive these
      days). Because of this, by the time user space releases the last
      reference to the hidraw file and drop_ref() tries to destroy the
      device the sysfs files are already gone and the kernel will print
      the warning above.
      
      Fix this by calling device_destroy() at USB disconnect time.
      Signed-off-by: default avatarFernando Luis Vazquez Cao <fernando@oss.ntt.co.jp>
      Reviewed-by: default avatarDavid Herrmann <dh.herrmann@gmail.com>
      Cc: stable@vger.kernel.org	# 3.13
      Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
      47587fc0
  6. 24 Feb, 2014 8 commits
  7. 20 Feb, 2014 2 commits
  8. 18 Feb, 2014 2 commits
  9. 17 Feb, 2014 12 commits