<feed xmlns='http://www.w3.org/2005/Atom'>
<title>xavi/android_kernel_m2note/drivers/usb, branch ng-7.1.2</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<id>https://gitea.privatedns.org/xavi/android_kernel_m2note/atom?h=ng-7.1.2</id>
<link rel='self' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/atom?h=ng-7.1.2'/>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/'/>
<updated>2019-05-03T17:28:36+00:00</updated>
<entry>
<title>usb: ohci: Proper handling of ed_rm_list to handle race condition between usb_kill_urb() and finish_unlinks()</title>
<updated>2019-05-03T17:28:36+00:00</updated>
<author>
<name>AMAN DEEP</name>
<email>aman.deep@samsung.com</email>
</author>
<published>2018-02-08T03:55:01+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=1a69bb6a7fd65b96e639d64cbede691b9d735ed0'/>
<id>urn:sha1:1a69bb6a7fd65b96e639d64cbede691b9d735ed0</id>
<content type='text'>
commit 46408ea558df13b110e0866b99624384a33bdeba upstream.

There is a race condition between finish_unlinks-&gt;finish_urb() function
and usb_kill_urb() in ohci controller case. The finish_urb calls
spin_unlock(&amp;ohci-&gt;lock) before usb_hcd_giveback_urb() function call,
then if during this time, usb_kill_urb is called for another endpoint,
then new ed will be added to ed_rm_list at beginning for unlink, and
ed_rm_list will point to newly added.

When finish_urb() is completed in finish_unlinks() and ed-&gt;td_list
becomes empty as in below code (in finish_unlinks() function):

        if (list_empty(&amp;ed-&gt;td_list)) {
                *last = ed-&gt;ed_next;
                ed-&gt;ed_next = NULL;
        } else if (ohci-&gt;rh_state == OHCI_RH_RUNNING) {
                *last = ed-&gt;ed_next;
                ed-&gt;ed_next = NULL;
                ed_schedule(ohci, ed);
        }

The *last = ed-&gt;ed_next will make ed_rm_list to point to ed-&gt;ed_next
and previously added ed by usb_kill_urb will be left unreferenced by
ed_rm_list. This causes usb_kill_urb() hang forever waiting for
finish_unlink to remove added ed from ed_rm_list.

The main reason for hang in this race condtion is addition and removal
of ed from ed_rm_list in the beginning during usb_kill_urb and later
last* is modified in finish_unlinks().

As suggested by Alan Stern, the solution for proper handling of
ohci-&gt;ed_rm_list is to remove ed from the ed_rm_list before finishing
any URBs. Then at the end, we can add ed back to the list if necessary.

This properly handle the updated ohci-&gt;ed_rm_list in usb_kill_urb().

Fixes: 977dcfdc6031 ("USB: OHCI: don't lose track of EDs when a controller dies")
Change-Id: I1b4bd2253db6e090fa5b7ffc4db356045c707e35
Acked-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Aman Deep &lt;aman.deep@samsung.com&gt;
Signed-off-by: Jeffy Chen &lt;jeffy.chen@rock-chips.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
[bwh: Backported to 3.16: adjust context]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>Revert "GCC: Fix up for gcc 5+"</title>
<updated>2018-11-29T23:02:49+00:00</updated>
<author>
<name>Moyster</name>
<email>oysterized@gmail.com</email>
</author>
<published>2018-11-29T22:59:26+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=be2a1194e40a49e08b28bc415e5126b0a99e1194'/>
<id>urn:sha1:be2a1194e40a49e08b28bc415e5126b0a99e1194</id>
<content type='text'>
This reverts commit ff505baaf412985af758d5820cd620ed9f1a7e05.
</content>
</entry>
<entry>
<title>Replace &lt;asm/uaccess.h&gt; with &lt;linux/uaccess.h&gt; globally</title>
<updated>2018-11-29T16:49:05+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2016-12-24T19:46:01+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=8588b01909e0145e5e84f5fe0a5353bd194f205c'/>
<id>urn:sha1:8588b01909e0145e5e84f5fe0a5353bd194f205c</id>
<content type='text'>
This was entirely automated, using the script by Al:

  PATT='^[[:blank:]]*#[[:blank:]]*include[[:blank:]]*&lt;asm/uaccess.h&gt;'
  sed -i -e "s!$PATT!#include &lt;linux/uaccess.h&gt;!" \
        $(git grep -l "$PATT"|grep -v ^include/linux/uaccess.h)

to do the replacement at the end of the merge window.

Requested-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Moyster &lt;oysterized@gmail.com&gt;
</content>
</entry>
<entry>
<title>USB: core: only clean up what we allocated</title>
<updated>2018-11-29T14:22:37+00:00</updated>
<author>
<name>Andrey Konovalov</name>
<email>andreyknvl@google.com</email>
</author>
<published>2017-12-11T21:48:41+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=108e7ab45786a56938e996a8c4a79b6c63612968'/>
<id>urn:sha1:108e7ab45786a56938e996a8c4a79b6c63612968</id>
<content type='text'>
When cleaning up the configurations, make sure we only free the number
of configurations and interfaces that we could have allocated.

Change-Id: I07a2ddd088264030544284ad9680cd6d2b538d21
Reported-by: Andrey Konovalov &lt;andreyknvl@google.com&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Git-commit: 32fd87b3bbf5f7a045546401dfe2894dbbf4d8c3
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Srinivasa Rao Kuppala &lt;srkupp@codeaurora.org&gt;
Signed-off-by: Dheeraj Kumar Chaudhary &lt;dheech@codeaurora.org&gt;
Signed-off-by: Richard JK &lt;rjk@codeaurora.org&gt;
</content>
</entry>
<entry>
<title>GCC: Fix up for gcc 5+</title>
<updated>2018-11-29T11:38:19+00:00</updated>
<author>
<name>mydongistiny</name>
<email>jaysonedson@gmail.com</email>
</author>
<published>2015-11-24T01:01:42+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=ff505baaf412985af758d5820cd620ed9f1a7e05'/>
<id>urn:sha1:ff505baaf412985af758d5820cd620ed9f1a7e05</id>
<content type='text'>
Signed-off-by: mydongistiny &lt;jaysonedson@gmail.com&gt;
Signed-off-by: Mister Oyster &lt;oysterized@gmail.com&gt;
</content>
</entry>
<entry>
<title>usb: replace %p with %pK</title>
<updated>2018-11-27T15:09:55+00:00</updated>
<author>
<name>Manu Gautam</name>
<email>mgautam@codeaurora.org</email>
</author>
<published>2017-02-24T09:52:40+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=513cef2c53c2b3846f6c571823412f514b6f66c7'/>
<id>urn:sha1:513cef2c53c2b3846f6c571823412f514b6f66c7</id>
<content type='text'>
Format specifier %p can leak kernel addresses while not valuing the
kptr_restrict system settings. When kptr_restrict is set to (1), kernel
pointers printed using the %pK format specifier will be replaced with 0's.
Debugging Note : &amp;pK prints only Zeros as address. If you need actual
address information, write 0 to kptr_restrict.
echo 0 &gt; /proc/sys/kernel/kptr_restrict

CRs-fixed: 1052849
Change-Id: I0e98145730380ea983fa8f46a28d15dd6c2c31df
Signed-off-by: Manu Gautam &lt;mgautam@codeaurora.org&gt;
Signed-off-by: Yasir Malik &lt;ymalik@codeaurora.org&gt;
Signed-off-by: Kevin F. Haggerty &lt;haggertk@lineageos.org&gt;
</content>
</entry>
<entry>
<title>ANDROID: usb: gadget: function: Fix Coding Style</title>
<updated>2018-05-16T13:14:18+00:00</updated>
<author>
<name>Anson Jacob</name>
<email>ansonjacob.aj@gmail.com</email>
</author>
<published>2016-11-17T07:48:31+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=b8cd94b8257adcf3d97ae336067912ca1f3baa58'/>
<id>urn:sha1:b8cd94b8257adcf3d97ae336067912ca1f3baa58</id>
<content type='text'>
Fix warning by checkpatch.pl:
Prefer 'unsigned int' to bare use of 'unsigned'

Patch applied by running fix inplace capability of checkpatch:
checkpatch.pl -f *.[ch] --types UNSPECIFIED_INT --fix-inplace

Change-Id: I2ba09a70e3a748ea8440f77d5c8e0349db248d49
Signed-off-by: Anson Jacob &lt;ansonjacob.aj@gmail.com&gt;
</content>
</entry>
<entry>
<title>ANDROID: usb: gadget: function: Fix commenting style</title>
<updated>2018-05-16T13:14:03+00:00</updated>
<author>
<name>Anson Jacob</name>
<email>ansonjacob.aj@gmail.com</email>
</author>
<published>2016-11-17T07:32:40+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=263131764ee5ed41a288e045f71c5505db1d281f'/>
<id>urn:sha1:263131764ee5ed41a288e045f71c5505db1d281f</id>
<content type='text'>
Fix checkpatch.pl warning:
Block comments use * on subsequent lines

Change-Id: I9c92f128fdb3aeeb6ab9c7039e11f857bebb9539
Signed-off-by: Anson Jacob &lt;ansonjacob.aj@gmail.com&gt;
</content>
</entry>
<entry>
<title>ANDROID: usb: gadget: function: cleanup: Add blank line after declaration</title>
<updated>2018-05-16T13:13:47+00:00</updated>
<author>
<name>Anson Jacob</name>
<email>ansonjacob-aj@gmail.com</email>
</author>
<published>2016-11-17T07:01:50+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=d3d7ba5ba1644aff4990fb0e9fb965d514976017'/>
<id>urn:sha1:d3d7ba5ba1644aff4990fb0e9fb965d514976017</id>
<content type='text'>
Fix warning generated by checkpatch.pl:
Missing a blank line after declarations

Change-Id: I8c1b069a57f90027edfdb3cd8fa011dfe87e44b7
Signed-off-by: Anson Jacob &lt;ansonjacob.aj@gmail.com&gt;
</content>
</entry>
<entry>
<title>usb: gadget: cleanup: removing duplicate bulk out ep alloc</title>
<updated>2018-05-16T13:13:35+00:00</updated>
<author>
<name>Anson Jacob</name>
<email>ansonkuzhumbil@gmail.com</email>
</author>
<published>2016-02-19T01:07:38+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=f9dd68e019ef6593adc0a48bb77d82aa1882a76d'/>
<id>urn:sha1:f9dd68e019ef6593adc0a48bb77d82aa1882a76d</id>
<content type='text'>
Removing duplicate allocation of usb accessory's bulk out endpoint

Issue: 67180

Change-Id: Icfb8111cdafa487e54b66f9450d49e52a02ae7a6
Signed-off-by: Anson Jacob &lt;ansonkuzhumbil@gmail.com&gt;
</content>
</entry>
</feed>
