<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/hid/hidraw.c, branch v3.4.2</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>Merge branch 'upstream' into for-linus</title>
<updated>2011-10-25T07:59:04+00:00</updated>
<author>
<name>Jiri Kosina</name>
<email>jkosina@suse.cz</email>
</author>
<published>2011-10-25T07:59:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b3aec7b686329e6bb65aa08c7f9458f7fd512f06'/>
<id>b3aec7b686329e6bb65aa08c7f9458f7fd512f06</id>
<content type='text'>
Conflicts:
	drivers/hid/hid-core.c
	drivers/hid/hid-ids.h
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Conflicts:
	drivers/hid/hid-core.c
	drivers/hid/hid-ids.h
</pre>
</div>
</content>
</entry>
<entry>
<title>HID: hidraw: open count should not increase if error</title>
<updated>2011-09-27T16:42:22+00:00</updated>
<author>
<name>Amit Nagal</name>
<email>helloin.amit@gmail.com</email>
</author>
<published>2011-09-27T17:41:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f554ff80339b4005856e6a86454d6ea2bb962ee5'/>
<id>f554ff80339b4005856e6a86454d6ea2bb962ee5</id>
<content type='text'>
In hidraw_open, if hid_hw_power returns with error, hidraw device open count
should not increase.

Signed-off-by: Amit Nagal &lt;helloin.amit@gmail.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>
In hidraw_open, if hid_hw_power returns with error, hidraw device open count
should not increase.

Signed-off-by: Amit Nagal &lt;helloin.amit@gmail.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>HID: hidraw: protect hidraw_disconnect() better</title>
<updated>2011-09-20T13:23:46+00:00</updated>
<author>
<name>James Hogan</name>
<email>james.hogan@imgtec.com</email>
</author>
<published>2011-09-20T13:23:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=65b01bd561dc995aab116aa784f97a37f7c49a65'/>
<id>65b01bd561dc995aab116aa784f97a37f7c49a65</id>
<content type='text'>
The function hidraw_disconnect() only acquires the hidraw minors_lock
when clearing the entry in hidraw_table. However the device_destroy()
call can cause a userland read/write to return with an error. It may
cause the program to release the file descripter before the disconnect
is finished. hidraw_disconnect() has already set hidraw-&gt;exist to 0,
which makes hidraw_release() kfree the hidraw structure, which
hidraw_disconnect() continues to access and even tries to kfree again.
Similarly if a hidraw_release() occurs after setting hidraw-&gt;exist to 0,
the same thing can happen.

This is fixed by expanding the mutex critical section to cover the whole
function from setting hidraw-&gt;exist to 0 to freeing the hidraw
structure, preventing a hidraw_release() from interfering.

Signed-off-by: James Hogan &lt;james.hogan@imgtec.com&gt;
Tested-by: David Herrmann &lt;dh.herrmann@googlemail.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 function hidraw_disconnect() only acquires the hidraw minors_lock
when clearing the entry in hidraw_table. However the device_destroy()
call can cause a userland read/write to return with an error. It may
cause the program to release the file descripter before the disconnect
is finished. hidraw_disconnect() has already set hidraw-&gt;exist to 0,
which makes hidraw_release() kfree the hidraw structure, which
hidraw_disconnect() continues to access and even tries to kfree again.
Similarly if a hidraw_release() occurs after setting hidraw-&gt;exist to 0,
the same thing can happen.

This is fixed by expanding the mutex critical section to cover the whole
function from setting hidraw-&gt;exist to 0 to freeing the hidraw
structure, preventing a hidraw_release() from interfering.

Signed-off-by: James Hogan &lt;james.hogan@imgtec.com&gt;
Tested-by: David Herrmann &lt;dh.herrmann@googlemail.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>HID: hidraw: free list for all error in hidraw_open</title>
<updated>2011-09-07T11:48:47+00:00</updated>
<author>
<name>Amit Nagal</name>
<email>helloin.amit@gmail.com</email>
</author>
<published>2011-09-07T11:48:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=1a8962317f494ad858971fc08ba035eff658a5c9'/>
<id>1a8962317f494ad858971fc08ba035eff658a5c9</id>
<content type='text'>
In function hidraw_open struct hidraw_list *list should be freed for
all error conditions.

Signed-off-by: Amit Nagal &lt;helloin.amit@gmail.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>
In function hidraw_open struct hidraw_list *list should be freed for
all error conditions.

Signed-off-by: Amit Nagal &lt;helloin.amit@gmail.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>HID: 'name' and 'phys' in 'struct hid_device' can never be NULL</title>
<updated>2011-05-18T11:23:31+00:00</updated>
<author>
<name>Daniel Mack</name>
<email>zonque@gmail.com</email>
</author>
<published>2011-05-15T16:07:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=dd2ed487fdd78b50549b2ca8418875c0d9f4a30e'/>
<id>dd2ed487fdd78b50549b2ca8418875c0d9f4a30e</id>
<content type='text'>
As they are static members of fix size, there is no need to NULL-check them.

Signed-off-by: Daniel Mack &lt;zonque@gmail.com&gt;
Cc: Dmitry Torokhov &lt;dtor@mail.ru&gt;
Cc: Jiri Kosina &lt;jkosina@suse.cz&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As they are static members of fix size, there is no need to NULL-check them.

Signed-off-by: Daniel Mack &lt;zonque@gmail.com&gt;
Cc: Dmitry Torokhov &lt;dtor@mail.ru&gt;
Cc: Jiri Kosina &lt;jkosina@suse.cz&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>HID: hidraw: fix comments</title>
<updated>2011-03-27T18:30:32+00:00</updated>
<author>
<name>Jiri Kosina</name>
<email>jkosina@suse.cz</email>
</author>
<published>2011-03-27T18:29:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d2a1cfebe38edc0bbac8f5cfbce062fe3d146d7a'/>
<id>d2a1cfebe38edc0bbac8f5cfbce062fe3d146d7a</id>
<content type='text'>
Adjust the comments a little bit.

Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Adjust the comments a little bit.

Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branches 'dragonrise', 'hidraw-feature', 'multitouch', 'ntrig', 'roccat', 'upstream' and 'upstream-fixes' into for-linus</title>
<updated>2011-03-17T13:31:46+00:00</updated>
<author>
<name>Jiri Kosina</name>
<email>jkosina@suse.cz</email>
</author>
<published>2011-03-17T13:31:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=65b06194c9c9f41bc07ac6a6d42edb4b9e43fea4'/>
<id>65b06194c9c9f41bc07ac6a6d42edb4b9e43fea4</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>HID: Add Support for Setting and Getting Feature Reports from hidraw</title>
<updated>2011-02-11T14:05:49+00:00</updated>
<author>
<name>Alan Ott</name>
<email>alan@signal11.us</email>
</author>
<published>2011-01-18T08:04:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b4dbde9da8ece42bbe4c70c26bac3b28dd6a3ddb'/>
<id>b4dbde9da8ece42bbe4c70c26bac3b28dd6a3ddb</id>
<content type='text'>
Per the HID Specification, Feature reports must be sent and received on
the Configuration endpoint (EP 0) through the Set_Report/Get_Report
interfaces.  This patch adds two ioctls to hidraw to set and get feature
reports to and from the device.  Modifications were made to hidraw and
usbhid.

New hidraw ioctls:
  HIDIOCSFEATURE - Perform a Set_Report transfer of a Feature report.
  HIDIOCGFEATURE - Perform a Get_Report transfer of a Feature report.

Signed-off-by: Alan Ott &lt;alan@signal11.us&gt;
Signed-off-by: Antonio Ospite &lt;ospite@studenti.unina.it&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Per the HID Specification, Feature reports must be sent and received on
the Configuration endpoint (EP 0) through the Set_Report/Get_Report
interfaces.  This patch adds two ioctls to hidraw to set and get feature
reports to and from the device.  Modifications were made to hidraw and
usbhid.

New hidraw ioctls:
  HIDIOCSFEATURE - Perform a Set_Report transfer of a Feature report.
  HIDIOCGFEATURE - Perform a Get_Report transfer of a Feature report.

Signed-off-by: Alan Ott &lt;alan@signal11.us&gt;
Signed-off-by: Antonio Ospite &lt;ospite@studenti.unina.it&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>HID: hidraw: fix hidraw_disconnect()</title>
<updated>2011-02-01T10:16:51+00:00</updated>
<author>
<name>Stefan Achatz</name>
<email>erazor_de@users.sourceforge.net</email>
</author>
<published>2011-01-29T01:17:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=3a22ebe9cc76acac2511b1d3979a35609924ce42'/>
<id>3a22ebe9cc76acac2511b1d3979a35609924ce42</id>
<content type='text'>
hidraw_disconnect() first sets an entry in hidraw_table to NULL
and calls device_destroy() afterwards. The thereby called
hidraw_release() tries to read this already cleared value resulting
in never removing any device from the list.
This got fixed by changing the order of events.

Signed-off-by: Stefan Achatz &lt;erazor_de@users.sourceforge.net&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
hidraw_disconnect() first sets an entry in hidraw_table to NULL
and calls device_destroy() afterwards. The thereby called
hidraw_release() tries to read this already cleared value resulting
in never removing any device from the list.
This got fixed by changing the order of events.

Signed-off-by: Stefan Achatz &lt;erazor_de@users.sourceforge.net&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>HID: hidraw: Replace Confusing += Operator with =</title>
<updated>2011-01-31T14:43:46+00:00</updated>
<author>
<name>Alan Ott</name>
<email>alan@signal11.us</email>
</author>
<published>2011-01-27T03:25:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=cf28a673666fba5770b40fb084584391f451c07d'/>
<id>cf28a673666fba5770b40fb084584391f451c07d</id>
<content type='text'>
Setting of the return value of hidraw_read() uses the += operator when
= is more appropriate.  There is no case where ret can be anything
other than zero when the assignment is made, making = equivalent to
+= and much more clear.

Signed-off-by: Alan Ott &lt;alan@signal11.us&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Setting of the return value of hidraw_read() uses the += operator when
= is more appropriate.  There is no case where ret can be anything
other than zero when the assignment is made, making = equivalent to
+= and much more clear.

Signed-off-by: Alan Ott &lt;alan@signal11.us&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</pre>
</div>
</content>
</entry>
</feed>
