<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/drivers/hid, branch linux-3.13.y</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>HID: hidraw: fix warning destroying hidraw device files after parent</title>
<updated>2014-03-31T17:05:13+00:00</updated>
<author>
<name>Fernando Luis Vazquez Cao</name>
<email>fernando@oss.ntt.co.jp</email>
</author>
<published>2014-02-26T07:51:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=4ed5cc1868f5c93d723962766840984e2260cd82'/>
<id>4ed5cc1868f5c93d723962766840984e2260cd82</id>
<content type='text'>
commit 47587fc098451c2100dc1fb618855fc2e2d937af upstream.

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:
 [&lt;ffffffff814cd684&gt;] ? dump_stack+0x41/0x51
 [&lt;ffffffff810616e7&gt;] ? warn_slowpath_common+0x77/0x90
 [&lt;ffffffff8106174c&gt;] ? warn_slowpath_fmt+0x4c/0x50
 [&lt;ffffffff81374fd0&gt;] ? device_del+0x40/0x1b0
 [&lt;ffffffff8137516f&gt;] ? device_unregister+0x2f/0x50
 [&lt;ffffffff813751fa&gt;] ? device_destroy+0x3a/0x40
 [&lt;ffffffffa03ca245&gt;] ? drop_ref+0x55/0x120 [hid]
 [&lt;ffffffffa03ca3e6&gt;] ? hidraw_release+0x96/0xb0 [hid]
 [&lt;ffffffff811929da&gt;] ? __fput+0xca/0x210
 [&lt;ffffffff8107fe17&gt;] ? task_work_run+0x97/0xd0
 [&lt;ffffffff810139a9&gt;] ? do_notify_resume+0x69/0xa0
 [&lt;ffffffff814dbd22&gt;] ? 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: Fernando Luis Vazquez Cao &lt;fernando@oss.ntt.co.jp&gt;
Reviewed-by: David Herrmann &lt;dh.herrmann@gmail.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 47587fc098451c2100dc1fb618855fc2e2d937af upstream.

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:
 [&lt;ffffffff814cd684&gt;] ? dump_stack+0x41/0x51
 [&lt;ffffffff810616e7&gt;] ? warn_slowpath_common+0x77/0x90
 [&lt;ffffffff8106174c&gt;] ? warn_slowpath_fmt+0x4c/0x50
 [&lt;ffffffff81374fd0&gt;] ? device_del+0x40/0x1b0
 [&lt;ffffffff8137516f&gt;] ? device_unregister+0x2f/0x50
 [&lt;ffffffff813751fa&gt;] ? device_destroy+0x3a/0x40
 [&lt;ffffffffa03ca245&gt;] ? drop_ref+0x55/0x120 [hid]
 [&lt;ffffffffa03ca3e6&gt;] ? hidraw_release+0x96/0xb0 [hid]
 [&lt;ffffffff811929da&gt;] ? __fput+0xca/0x210
 [&lt;ffffffff8107fe17&gt;] ? task_work_run+0x97/0xd0
 [&lt;ffffffff810139a9&gt;] ? do_notify_resume+0x69/0xa0
 [&lt;ffffffff814dbd22&gt;] ? 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: Fernando Luis Vazquez Cao &lt;fernando@oss.ntt.co.jp&gt;
Reviewed-by: David Herrmann &lt;dh.herrmann@gmail.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid</title>
<updated>2013-12-13T21:21:28+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2013-12-13T21:21:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=1008ebb61e01e3152901b4c5f58bd01a60ed115b'/>
<id>1008ebb61e01e3152901b4c5f58bd01a60ed115b</id>
<content type='text'>
Pull HID fixes from Jiri Kosina:

 - Genius Gx Imperator Keyboard regression fix (missing break in case),
   by Ben Hutchings

 - duplicate sysfs entry error fix for hid-sensor-hub driver, by
   Srinivas Pandruvada

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
  HID: hid-sensor-hub: fix duplicate sysfs entry error
  HID: kye: Fix missing break in kye_report_fixup()
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull HID fixes from Jiri Kosina:

 - Genius Gx Imperator Keyboard regression fix (missing break in case),
   by Ben Hutchings

 - duplicate sysfs entry error fix for hid-sensor-hub driver, by
   Srinivas Pandruvada

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
  HID: hid-sensor-hub: fix duplicate sysfs entry error
  HID: kye: Fix missing break in kye_report_fixup()
</pre>
</div>
</content>
</entry>
<entry>
<title>HID: hid-sensor-hub: fix duplicate sysfs entry error</title>
<updated>2013-12-09T14:46:09+00:00</updated>
<author>
<name>Srinivas Pandruvada</name>
<email>srinivas.pandruvada@linux.intel.com</email>
</author>
<published>2013-12-06T00:34:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=d81cae806af428898f63391b5d7cd7ba0d87025d'/>
<id>d81cae806af428898f63391b5d7cd7ba0d87025d</id>
<content type='text'>
Fix kernel warning and failure to register sensor hub devices with MFD.  Now
many devices has in-built sensor hubs. So by default this HID hub, is properly
parsed and register individual sensors as platform device using MFD framework.
But if a second sensor hub is attached via USB, which has same sensors, it will
result in kernel warning and failure to register MFD cell as the platform
device sysfs file name will be same as created by in-built sensor hubs. This
patch sets MFD cell id to PLATFORM_DEVID_AUTO. In this way there will never be
duplicate sysfs file names.

Signed-off-by: Srinivas Pandruvada &lt;srinivas.pandruvada@linux.intel.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix kernel warning and failure to register sensor hub devices with MFD.  Now
many devices has in-built sensor hubs. So by default this HID hub, is properly
parsed and register individual sensors as platform device using MFD framework.
But if a second sensor hub is attached via USB, which has same sensors, it will
result in kernel warning and failure to register MFD cell as the platform
device sysfs file name will be same as created by in-built sensor hubs. This
patch sets MFD cell id to PLATFORM_DEVID_AUTO. In this way there will never be
duplicate sysfs file names.

Signed-off-by: Srinivas Pandruvada &lt;srinivas.pandruvada@linux.intel.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge tag 'iio-fixes-for-3.13b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-linus</title>
<updated>2013-12-03T21:24:58+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2013-12-03T21:24:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=55ef003e4ae684d5660f984eb2352df12572d9df'/>
<id>55ef003e4ae684d5660f984eb2352df12572d9df</id>
<content type='text'>
Jonathan writes:

Second round of IIO fixes for the 3.13 cycle.

2 fixes here.

* The gp2ap020a00f is a simple missing kconfig dependency.

* The hid sensors hub fix is a work around for an issue introduced by hardware
changes due to a certain large software vendor having an 'interesting'
interpretation of the specification and hence indexing some arrays from 1
rather than 0.  The fix takes advantage of the logical min and max reading
facilities introduced by the precursor patch to figure out whether we have
a 0 indexed or 1 indexed device and to adjust appropriately.  It also
drops a previous kconfig option that allowed this issue to be worked around
at build time.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Jonathan writes:

Second round of IIO fixes for the 3.13 cycle.

2 fixes here.

* The gp2ap020a00f is a simple missing kconfig dependency.

* The hid sensors hub fix is a work around for an issue introduced by hardware
changes due to a certain large software vendor having an 'interesting'
interpretation of the specification and hence indexing some arrays from 1
rather than 0.  The fix takes advantage of the logical min and max reading
facilities introduced by the precursor patch to figure out whether we have
a 0 indexed or 1 indexed device and to adjust appropriately.  It also
drops a previous kconfig option that allowed this issue to be worked around
at build time.
</pre>
</div>
</content>
</entry>
<entry>
<title>HID: hid-sensor-hub: Add logical min and max</title>
<updated>2013-12-02T21:05:30+00:00</updated>
<author>
<name>Srinivas Pandruvada</name>
<email>srinivas.pandruvada@linux.intel.com</email>
</author>
<published>2013-11-27T22:19:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=9f740ffa8134aaef770f964485dac3ed6780d8b7'/>
<id>9f740ffa8134aaef770f964485dac3ed6780d8b7</id>
<content type='text'>
Exporting logical minimum and maximum of HID fields as part of the
hid sensor attribute info. This can be used for range checking and
to calculate enumeration base for NAry fields of HID sensor hub.

Signed-off-by: Srinivas Pandruvada &lt;srinivas.pandruvada@linux.intel.com&gt;
Signed-off-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Exporting logical minimum and maximum of HID fields as part of the
hid sensor attribute info. This can be used for range checking and
to calculate enumeration base for NAry fields of HID sensor hub.

Signed-off-by: Srinivas Pandruvada &lt;srinivas.pandruvada@linux.intel.com&gt;
Signed-off-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>HID: kye: Fix missing break in kye_report_fixup()</title>
<updated>2013-12-02T14:17:04+00:00</updated>
<author>
<name>Ben Hutchings</name>
<email>ben@decadent.org.uk</email>
</author>
<published>2013-11-30T19:12:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=0a5f99cfff2297f6c350b7f54878cbbf1b1253d5'/>
<id>0a5f99cfff2297f6c350b7f54878cbbf1b1253d5</id>
<content type='text'>
The change to support Genius Manticore Keyboard also changed behaviour
for Genius Gx Imperator Keyboard, as there is no break between the
cases.  This is presumably a mistake.

Reported by Coverity as CID 1134029.

Fixes: 4a2c94c9b6c0 ('HID: kye: Add report fixup for Genius Manticore Keyboard')
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The change to support Genius Manticore Keyboard also changed behaviour
for Genius Gx Imperator Keyboard, as there is no break between the
cases.  This is presumably a mistake.

Reported by Coverity as CID 1134029.

Fixes: 4a2c94c9b6c0 ('HID: kye: Add report fixup for Genius Manticore Keyboard')
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid</title>
<updated>2013-11-28T04:41:54+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2013-11-28T04:41:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=ba33fef0f62a97e1faf285a5ee2bcad85622f4fd'/>
<id>ba33fef0f62a97e1faf285a5ee2bcad85622f4fd</id>
<content type='text'>
Pull HID fixes from Jiri Kosina:
 - fix compat ioctl leak in uhid, by David Herrmann
 - fix scheduling in atomic context (causing actual lockups in real
   world) in hid-sony driver, by Sven Eckelmann
 - revert patch introducing VID/PID conflict, by Jiri Kosina
 - support from various new device IDs by Benjamin Tissoires and
   KaiChung Cheng

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
  HID: uhid: fix leak for 64/32 UHID_CREATE
  HID: kye: fix unresponsive keyboard
  HID: kye: Add report fixup for Genius Manticore Keyboard
  HID: multicouh: add PID VID to support 1 new Wistron optical touch device
  HID: appleir: force input to be set
  Revert "HID: wiimote: add LEGO-wiimote VID"
  HID: sony: Send FF commands in non-atomic context
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull HID fixes from Jiri Kosina:
 - fix compat ioctl leak in uhid, by David Herrmann
 - fix scheduling in atomic context (causing actual lockups in real
   world) in hid-sony driver, by Sven Eckelmann
 - revert patch introducing VID/PID conflict, by Jiri Kosina
 - support from various new device IDs by Benjamin Tissoires and
   KaiChung Cheng

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
  HID: uhid: fix leak for 64/32 UHID_CREATE
  HID: kye: fix unresponsive keyboard
  HID: kye: Add report fixup for Genius Manticore Keyboard
  HID: multicouh: add PID VID to support 1 new Wistron optical touch device
  HID: appleir: force input to be set
  Revert "HID: wiimote: add LEGO-wiimote VID"
  HID: sony: Send FF commands in non-atomic context
</pre>
</div>
</content>
</entry>
<entry>
<title>HID: uhid: fix leak for 64/32 UHID_CREATE</title>
<updated>2013-11-27T09:53:49+00:00</updated>
<author>
<name>David Herrmann</name>
<email>dh.herrmann@gmail.com</email>
</author>
<published>2013-11-26T12:58:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=80897aa787ecd58eabb29deab7cbec9249c9b7e6'/>
<id>80897aa787ecd58eabb29deab7cbec9249c9b7e6</id>
<content type='text'>
UHID allows short writes so user-space can omit unused fields. We
automatically set them to 0 in the kernel. However, the 64/32 bit
compat-handler didn't do that in the UHID_CREATE fallback. This will
reveal random kernel heap data (of random size, even) to user-space.

Fixes: befde0226a59 ('HID: uhid: make creating devices work on 64/32 systems')

Reported-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
Signed-off-by: David Herrmann &lt;dh.herrmann@gmail.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
UHID allows short writes so user-space can omit unused fields. We
automatically set them to 0 in the kernel. However, the 64/32 bit
compat-handler didn't do that in the UHID_CREATE fallback. This will
reveal random kernel heap data (of random size, even) to user-space.

Fixes: befde0226a59 ('HID: uhid: make creating devices work on 64/32 systems')

Reported-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
Signed-off-by: David Herrmann &lt;dh.herrmann@gmail.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>HID: kye: fix unresponsive keyboard</title>
<updated>2013-11-21T09:28:58+00:00</updated>
<author>
<name>Benjamin Tissoires</name>
<email>benjamin.tissoires@redhat.com</email>
</author>
<published>2013-11-20T14:49:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=8a396321e2102d98a0d387c773be13b55d88ae6f'/>
<id>8a396321e2102d98a0d387c773be13b55d88ae6f</id>
<content type='text'>
The manticore keyboard requires that all usb EP are opened at least
once to be fully functional. The third EP forwards to the user space
some vendor specific information about the keyboard state, but are useless
currently for the kernel.

Opening them and closing them makes the keyboard responsive again.

Reported-and-tested-by: Adam Kulagowski &lt;fidor@fidor.org&gt;
Signed-off-by: Benjamin Tissoires &lt;benjamin.tissoires@redhat.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The manticore keyboard requires that all usb EP are opened at least
once to be fully functional. The third EP forwards to the user space
some vendor specific information about the keyboard state, but are useless
currently for the kernel.

Opening them and closing them makes the keyboard responsive again.

Reported-and-tested-by: Adam Kulagowski &lt;fidor@fidor.org&gt;
Signed-off-by: Benjamin Tissoires &lt;benjamin.tissoires@redhat.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>HID: kye: Add report fixup for Genius Manticore Keyboard</title>
<updated>2013-11-21T09:28:58+00:00</updated>
<author>
<name>Benjamin Tissoires</name>
<email>benjamin.tissoires@redhat.com</email>
</author>
<published>2013-11-20T14:49:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=4a2c94c9b6c03af61b04993340bd9559e2277de4'/>
<id>4a2c94c9b6c03af61b04993340bd9559e2277de4</id>
<content type='text'>
Genius Manticore Keyboard presents the same problem in its report
descriptors than Genius Gila Gaming Mouse and Genius Imperator Keyboard.
Use the same fixup.

Reported-and-tested-by: Adam Kulagowski &lt;fidor@fidor.org&gt;
Signed-off-by: Benjamin Tissoires &lt;benjamin.tissoires@redhat.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Genius Manticore Keyboard presents the same problem in its report
descriptors than Genius Gila Gaming Mouse and Genius Imperator Keyboard.
Use the same fixup.

Reported-and-tested-by: Adam Kulagowski &lt;fidor@fidor.org&gt;
Signed-off-by: Benjamin Tissoires &lt;benjamin.tissoires@redhat.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</pre>
</div>
</content>
</entry>
</feed>
