<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git, branch v3.18.32</title>
<subtitle>Clone of https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git</subtitle>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/'/>
<entry>
<title>Linux 3.18.32</title>
<updated>2016-04-23T20:46:40+00:00</updated>
<author>
<name>Sasha Levin</name>
<email>sasha.levin@oracle.com</email>
</author>
<published>2016-04-23T20:46:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=834125557e0a4e5afafee3caf79696078d0820ae'/>
<id>834125557e0a4e5afafee3caf79696078d0820ae</id>
<content type='text'>
Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tcp_cubic: do not set epoch_start in the future</title>
<updated>2016-04-23T20:45:18+00:00</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2015-09-17T15:38:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=e912c4abafa7d306539040b1a231d277fd750be8'/>
<id>e912c4abafa7d306539040b1a231d277fd750be8</id>
<content type='text'>
[ Upstream commit c2e7204d180f8efc80f27959ca9cf16fa17f67db ]

Tracking idle time in bictcp_cwnd_event() is imprecise, as epoch_start
is normally set at ACK processing time, not at send time.

Doing a proper fix would need to add an additional state variable,
and does not seem worth the trouble, given CUBIC bug has been there
forever before Jana noticed it.

Let's simply not set epoch_start in the future, otherwise
bictcp_update() could overflow and CUBIC would again
grow cwnd too fast.

This was detected thanks to a packetdrill test Neal wrote that was flaky
before applying this fix.

Fixes: 30927520dbae ("tcp_cubic: better follow cubic curve after idle period")
Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: Neal Cardwell &lt;ncardwell@google.com&gt;
Signed-off-by: Yuchung Cheng &lt;ycheng@google.com&gt;
Cc: Jana Iyengar &lt;jri@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit c2e7204d180f8efc80f27959ca9cf16fa17f67db ]

Tracking idle time in bictcp_cwnd_event() is imprecise, as epoch_start
is normally set at ACK processing time, not at send time.

Doing a proper fix would need to add an additional state variable,
and does not seem worth the trouble, given CUBIC bug has been there
forever before Jana noticed it.

Let's simply not set epoch_start in the future, otherwise
bictcp_update() could overflow and CUBIC would again
grow cwnd too fast.

This was detected thanks to a packetdrill test Neal wrote that was flaky
before applying this fix.

Fixes: 30927520dbae ("tcp_cubic: better follow cubic curve after idle period")
Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: Neal Cardwell &lt;ncardwell@google.com&gt;
Signed-off-by: Yuchung Cheng &lt;ycheng@google.com&gt;
Cc: Jana Iyengar &lt;jri@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Btrfs: fix list transaction-&gt;pending_ordered corruption</title>
<updated>2016-04-23T00:38:30+00:00</updated>
<author>
<name>Filipe Manana</name>
<email>fdmanana@suse.com</email>
</author>
<published>2015-07-03T19:30:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=5d6226fe6abbaf576328d6cbc8c5473f32428d68'/>
<id>5d6226fe6abbaf576328d6cbc8c5473f32428d68</id>
<content type='text'>
[ Upstream commit d3efe08400317888f559bbedf0e42cd31575d0ef ]

When we call btrfs_commit_transaction(), we splice the list "ordered"
of our transaction handle into the transaction's "pending_ordered"
list, but we don't re-initialize the "ordered" list of our transaction
handle, this means it still points to the same elements it used to
before the splice. Then we check if the current transaction's state is
&gt;= TRANS_STATE_COMMIT_START and if it is we end up calling
btrfs_end_transaction() which simply splices again the "ordered" list
of our handle into the transaction's "pending_ordered" list, leaving
multiple pointers to the same ordered extents which results in list
corruption when we are iterating, removing and freeing ordered extents
at btrfs_wait_pending_ordered(), resulting in access to dangling
pointers / use-after-free issues.
Similarly, btrfs_end_transaction() can end up in some cases calling
btrfs_commit_transaction(), and both did a list splice of the transaction
handle's "ordered" list into the transaction's "pending_ordered" without
re-initializing the handle's "ordered" list, resulting in exactly the
same problem.

This produces the following warning on a kernel with linked list
debugging enabled:

[109749.265416] ------------[ cut here ]------------
[109749.266410] WARNING: CPU: 7 PID: 324 at lib/list_debug.c:59 __list_del_entry+0x5a/0x98()
[109749.267969] list_del corruption. prev-&gt;next should be ffff8800ba087e20, but was fffffff8c1f7c35d
(...)
[109749.287505] Call Trace:
[109749.288135]  [&lt;ffffffff8145f077&gt;] dump_stack+0x4f/0x7b
[109749.298080]  [&lt;ffffffff81095de5&gt;] ? console_unlock+0x356/0x3a2
[109749.331605]  [&lt;ffffffff8104b3b0&gt;] warn_slowpath_common+0xa1/0xbb
[109749.334849]  [&lt;ffffffff81260642&gt;] ? __list_del_entry+0x5a/0x98
[109749.337093]  [&lt;ffffffff8104b410&gt;] warn_slowpath_fmt+0x46/0x48
[109749.337847]  [&lt;ffffffff81260642&gt;] __list_del_entry+0x5a/0x98
[109749.338678]  [&lt;ffffffffa053e8bf&gt;] btrfs_wait_pending_ordered+0x46/0xdb [btrfs]
[109749.340145]  [&lt;ffffffffa058a65f&gt;] ? __btrfs_run_delayed_items+0x149/0x163 [btrfs]
[109749.348313]  [&lt;ffffffffa054077d&gt;] btrfs_commit_transaction+0x36b/0xa10 [btrfs]
[109749.349745]  [&lt;ffffffff81087310&gt;] ? trace_hardirqs_on+0xd/0xf
[109749.350819]  [&lt;ffffffffa055370d&gt;] btrfs_sync_file+0x36f/0x3fc [btrfs]
[109749.351976]  [&lt;ffffffff8118ec98&gt;] vfs_fsync_range+0x8f/0x9e
[109749.360341]  [&lt;ffffffff8118ecc3&gt;] vfs_fsync+0x1c/0x1e
[109749.368828]  [&lt;ffffffff8118ee1d&gt;] do_fsync+0x34/0x4e
[109749.369790]  [&lt;ffffffff8118f045&gt;] SyS_fsync+0x10/0x14
[109749.370925]  [&lt;ffffffff81465197&gt;] system_call_fastpath+0x12/0x6f
[109749.382274] ---[ end trace 48e0d07f7c03d95a ]---

On a non-debug kernel this leads to invalid memory accesses, causing a
crash. Fix this by using list_splice_init() instead of list_splice() in
btrfs_commit_transaction() and btrfs_end_transaction().

Cc: stable@vger.kernel.org
Fixes: 50d9aa99bd35 ("Btrfs: make sure logged extents complete in the current transaction V3"
Signed-off-by: Filipe Manana &lt;fdmanana@suse.com&gt;
Reviewed-by: David Sterba &lt;dsterba@suse.com&gt;
Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit d3efe08400317888f559bbedf0e42cd31575d0ef ]

When we call btrfs_commit_transaction(), we splice the list "ordered"
of our transaction handle into the transaction's "pending_ordered"
list, but we don't re-initialize the "ordered" list of our transaction
handle, this means it still points to the same elements it used to
before the splice. Then we check if the current transaction's state is
&gt;= TRANS_STATE_COMMIT_START and if it is we end up calling
btrfs_end_transaction() which simply splices again the "ordered" list
of our handle into the transaction's "pending_ordered" list, leaving
multiple pointers to the same ordered extents which results in list
corruption when we are iterating, removing and freeing ordered extents
at btrfs_wait_pending_ordered(), resulting in access to dangling
pointers / use-after-free issues.
Similarly, btrfs_end_transaction() can end up in some cases calling
btrfs_commit_transaction(), and both did a list splice of the transaction
handle's "ordered" list into the transaction's "pending_ordered" without
re-initializing the handle's "ordered" list, resulting in exactly the
same problem.

This produces the following warning on a kernel with linked list
debugging enabled:

[109749.265416] ------------[ cut here ]------------
[109749.266410] WARNING: CPU: 7 PID: 324 at lib/list_debug.c:59 __list_del_entry+0x5a/0x98()
[109749.267969] list_del corruption. prev-&gt;next should be ffff8800ba087e20, but was fffffff8c1f7c35d
(...)
[109749.287505] Call Trace:
[109749.288135]  [&lt;ffffffff8145f077&gt;] dump_stack+0x4f/0x7b
[109749.298080]  [&lt;ffffffff81095de5&gt;] ? console_unlock+0x356/0x3a2
[109749.331605]  [&lt;ffffffff8104b3b0&gt;] warn_slowpath_common+0xa1/0xbb
[109749.334849]  [&lt;ffffffff81260642&gt;] ? __list_del_entry+0x5a/0x98
[109749.337093]  [&lt;ffffffff8104b410&gt;] warn_slowpath_fmt+0x46/0x48
[109749.337847]  [&lt;ffffffff81260642&gt;] __list_del_entry+0x5a/0x98
[109749.338678]  [&lt;ffffffffa053e8bf&gt;] btrfs_wait_pending_ordered+0x46/0xdb [btrfs]
[109749.340145]  [&lt;ffffffffa058a65f&gt;] ? __btrfs_run_delayed_items+0x149/0x163 [btrfs]
[109749.348313]  [&lt;ffffffffa054077d&gt;] btrfs_commit_transaction+0x36b/0xa10 [btrfs]
[109749.349745]  [&lt;ffffffff81087310&gt;] ? trace_hardirqs_on+0xd/0xf
[109749.350819]  [&lt;ffffffffa055370d&gt;] btrfs_sync_file+0x36f/0x3fc [btrfs]
[109749.351976]  [&lt;ffffffff8118ec98&gt;] vfs_fsync_range+0x8f/0x9e
[109749.360341]  [&lt;ffffffff8118ecc3&gt;] vfs_fsync+0x1c/0x1e
[109749.368828]  [&lt;ffffffff8118ee1d&gt;] do_fsync+0x34/0x4e
[109749.369790]  [&lt;ffffffff8118f045&gt;] SyS_fsync+0x10/0x14
[109749.370925]  [&lt;ffffffff81465197&gt;] system_call_fastpath+0x12/0x6f
[109749.382274] ---[ end trace 48e0d07f7c03d95a ]---

On a non-debug kernel this leads to invalid memory accesses, causing a
crash. Fix this by using list_splice_init() instead of list_splice() in
btrfs_commit_transaction() and btrfs_end_transaction().

Cc: stable@vger.kernel.org
Fixes: 50d9aa99bd35 ("Btrfs: make sure logged extents complete in the current transaction V3"
Signed-off-by: Filipe Manana &lt;fdmanana@suse.com&gt;
Reviewed-by: David Sterba &lt;dsterba@suse.com&gt;
Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Correct backport of fa3c776 ("Thermal: Ignore invalid trip points")</title>
<updated>2016-04-23T00:38:23+00:00</updated>
<author>
<name>Mike Galbraith</name>
<email>umgwanakikbuti@gmail.com</email>
</author>
<published>2016-04-23T00:38:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=95617b5e03996c9b76743c187d53849ae1c296a2'/>
<id>95617b5e03996c9b76743c187d53849ae1c296a2</id>
<content type='text'>
Backport of 81ad4276b505e987dd8ebbdf63605f92cd172b52 failed to adjust
for intervening -&gt;get_trip_temp() argument type change, thus causing
stack protector to panic.

drivers/thermal/thermal_core.c: In function ‘thermal_zone_device_register’:
drivers/thermal/thermal_core.c:1569:41: warning: passing argument 3 of
‘tz-&gt;ops-&gt;get_trip_temp’ from incompatible pointer type [-Wincompatible-pointer-types]
   if (tz-&gt;ops-&gt;get_trip_temp(tz, count, &amp;trip_temp))
                                         ^
drivers/thermal/thermal_core.c:1569:41: note: expected ‘long unsigned int *’
but argument is of type ‘int *’

CC: &lt;stable@vger.kernel.org&gt; #3.18,#4.1
Signed-off-by: Mike Galbraith &lt;umgwanakikbuti@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Backport of 81ad4276b505e987dd8ebbdf63605f92cd172b52 failed to adjust
for intervening -&gt;get_trip_temp() argument type change, thus causing
stack protector to panic.

drivers/thermal/thermal_core.c: In function ‘thermal_zone_device_register’:
drivers/thermal/thermal_core.c:1569:41: warning: passing argument 3 of
‘tz-&gt;ops-&gt;get_trip_temp’ from incompatible pointer type [-Wincompatible-pointer-types]
   if (tz-&gt;ops-&gt;get_trip_temp(tz, count, &amp;trip_temp))
                                         ^
drivers/thermal/thermal_core.c:1569:41: note: expected ‘long unsigned int *’
but argument is of type ‘int *’

CC: &lt;stable@vger.kernel.org&gt; #3.18,#4.1
Signed-off-by: Mike Galbraith &lt;umgwanakikbuti@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>usb: musb: cppi41: correct the macro name EP_MODE_AUTOREG_*</title>
<updated>2016-04-21T11:58:08+00:00</updated>
<author>
<name>Bin Liu</name>
<email>b-liu@ti.com</email>
</author>
<published>2015-01-26T22:22:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=e1ae108d141866e3ac73aa31575027271b8d42c4'/>
<id>e1ae108d141866e3ac73aa31575027271b8d42c4</id>
<content type='text'>
[ Upstream commit 0149b07a9e28b0d8bd2fc1c238ffe7d530c2673f ]

The macro EP_MODE_AUTOREG_* should be called EP_MODE_AUTOREQ_*, as they
are used for register AUTOREQ.

Signed-off-by: Bin Liu &lt;b-liu@ti.com&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 0149b07a9e28b0d8bd2fc1c238ffe7d530c2673f ]

The macro EP_MODE_AUTOREG_* should be called EP_MODE_AUTOREQ_*, as they
are used for register AUTOREQ.

Signed-off-by: Bin Liu &lt;b-liu@ti.com&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tcp_cubic: better follow cubic curve after idle period</title>
<updated>2016-04-20T13:41:08+00:00</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2015-09-10T04:55:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=3aacca81cca936538810ae97612f9132d38ba7ac'/>
<id>3aacca81cca936538810ae97612f9132d38ba7ac</id>
<content type='text'>
[ Upstream commit 30927520dbae297182990bb21d08762bcc35ce1d ]

Jana Iyengar found an interesting issue on CUBIC :

The epoch is only updated/reset initially and when experiencing losses.
The delta "t" of now - epoch_start can be arbitrary large after app idle
as well as the bic_target. Consequentially the slope (inverse of
ca-&gt;cnt) would be really large, and eventually ca-&gt;cnt would be
lower-bounded in the end to 2 to have delayed-ACK slow-start behavior.

This particularly shows up when slow_start_after_idle is disabled
as a dangerous cwnd inflation (1.5 x RTT) after few seconds of idle
time.

Jana initial fix was to reset epoch_start if app limited,
but Neal pointed out it would ask the CUBIC algorithm to recalculate the
curve so that we again start growing steeply upward from where cwnd is
now (as CUBIC does just after a loss). Ideally we'd want the cwnd growth
curve to be the same shape, just shifted later in time by the amount of
the idle period.

Reported-by: Jana Iyengar &lt;jri@google.com&gt;
Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: Yuchung Cheng &lt;ycheng@google.com&gt;
Signed-off-by: Neal Cardwell &lt;ncardwell@google.com&gt;
Cc: Stephen Hemminger &lt;stephen@networkplumber.org&gt;
Cc: Sangtae Ha &lt;sangtae.ha@gmail.com&gt;
Cc: Lawrence Brakmo &lt;lawrence@brakmo.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 30927520dbae297182990bb21d08762bcc35ce1d ]

Jana Iyengar found an interesting issue on CUBIC :

The epoch is only updated/reset initially and when experiencing losses.
The delta "t" of now - epoch_start can be arbitrary large after app idle
as well as the bic_target. Consequentially the slope (inverse of
ca-&gt;cnt) would be really large, and eventually ca-&gt;cnt would be
lower-bounded in the end to 2 to have delayed-ACK slow-start behavior.

This particularly shows up when slow_start_after_idle is disabled
as a dangerous cwnd inflation (1.5 x RTT) after few seconds of idle
time.

Jana initial fix was to reset epoch_start if app limited,
but Neal pointed out it would ask the CUBIC algorithm to recalculate the
curve so that we again start growing steeply upward from where cwnd is
now (as CUBIC does just after a loss). Ideally we'd want the cwnd growth
curve to be the same shape, just shifted later in time by the amount of
the idle period.

Reported-by: Jana Iyengar &lt;jri@google.com&gt;
Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: Yuchung Cheng &lt;ycheng@google.com&gt;
Signed-off-by: Neal Cardwell &lt;ncardwell@google.com&gt;
Cc: Stephen Hemminger &lt;stephen@networkplumber.org&gt;
Cc: Sangtae Ha &lt;sangtae.ha@gmail.com&gt;
Cc: Lawrence Brakmo &lt;lawrence@brakmo.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>usb: hcd: out of bounds access in for_each_companion</title>
<updated>2016-04-20T13:41:07+00:00</updated>
<author>
<name>Robert Dobrowolski</name>
<email>robert.dobrowolski@linux.intel.com</email>
</author>
<published>2016-03-24T10:30:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=c1ffc7c90954257b66b17eff3a0732dfe449f853'/>
<id>c1ffc7c90954257b66b17eff3a0732dfe449f853</id>
<content type='text'>
[ Upstream commit e86103a75705c7c530768f4ffaba74cf382910f2 ]

On BXT platform Host Controller and Device Controller figure as
same PCI device but with different device function. HCD should
not pass data to Device Controller but only to Host Controllers.
Checking if companion device is Host Controller, otherwise skip.

Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Robert Dobrowolski &lt;robert.dobrowolski@linux.intel.com&gt;
Acked-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit e86103a75705c7c530768f4ffaba74cf382910f2 ]

On BXT platform Host Controller and Device Controller figure as
same PCI device but with different device function. HCD should
not pass data to Device Controller but only to Host Controllers.
Checking if companion device is Host Controller, otherwise skip.

Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Robert Dobrowolski &lt;robert.dobrowolski@linux.intel.com&gt;
Acked-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>USB: uas: Add a new NO_REPORT_LUNS quirk</title>
<updated>2016-04-20T13:41:07+00:00</updated>
<author>
<name>Hans de Goede</name>
<email>hdegoede@redhat.com</email>
</author>
<published>2016-04-12T10:27:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=e6102e3b2f80d5af732587b9f254619a608cbf39'/>
<id>e6102e3b2f80d5af732587b9f254619a608cbf39</id>
<content type='text'>
[ Upstream commit 1363074667a6b7d0507527742ccd7bbed5e3ceaa ]

Add a new NO_REPORT_LUNS quirk and set it for Seagate drives with
an usb-id of: 0bc2:331a, as these will fail to respond to a
REPORT_LUNS command.

Cc: stable@vger.kernel.org
Reported-and-tested-by: David Webb &lt;djw@noc.ac.uk&gt;
Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Acked-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 1363074667a6b7d0507527742ccd7bbed5e3ceaa ]

Add a new NO_REPORT_LUNS quirk and set it for Seagate drives with
an usb-id of: 0bc2:331a, as these will fail to respond to a
REPORT_LUNS command.

Cc: stable@vger.kernel.org
Reported-and-tested-by: David Webb &lt;djw@noc.ac.uk&gt;
Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Acked-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>xhci: fix 10 second timeout on removal of PCI hotpluggable xhci controllers</title>
<updated>2016-04-20T13:41:06+00:00</updated>
<author>
<name>Mathias Nyman</name>
<email>mathias.nyman@linux.intel.com</email>
</author>
<published>2016-04-08T13:25:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=ef6d6f5865629591d63561fd12ae01931c77a80a'/>
<id>ef6d6f5865629591d63561fd12ae01931c77a80a</id>
<content type='text'>
[ Upstream commit 98d74f9ceaefc2b6c4a6440050163a83be0abede ]

PCI hotpluggable xhci controllers such as some Alpine Ridge solutions will
remove the xhci controller from the PCI bus when the last USB device is
disconnected.

Add a flag to indicate that the host is being removed to avoid queueing
configure_endpoint commands for the dropped endpoints.
For PCI hotplugged controllers this will prevent 5 second command timeouts
For static xhci controllers the configure_endpoint command is not needed
in the removal case as everything will be returned, freed, and the
controller is reset.

For now the flag is only set for PCI connected host controllers.

Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Mathias Nyman &lt;mathias.nyman@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 98d74f9ceaefc2b6c4a6440050163a83be0abede ]

PCI hotpluggable xhci controllers such as some Alpine Ridge solutions will
remove the xhci controller from the PCI bus when the last USB device is
disconnected.

Add a flag to indicate that the host is being removed to avoid queueing
configure_endpoint commands for the dropped endpoints.
For PCI hotplugged controllers this will prevent 5 second command timeouts
For static xhci controllers the configure_endpoint command is not needed
in the removal case as everything will be returned, freed, and the
controller is reset.

For now the flag is only set for PCI connected host controllers.

Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Mathias Nyman &lt;mathias.nyman@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>usb: xhci: fix xhci locking up during hcd remove</title>
<updated>2016-04-20T13:41:06+00:00</updated>
<author>
<name>Roger Quadros</name>
<email>rogerq@ti.com</email>
</author>
<published>2015-05-29T14:01:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=797648b968a85d6d79253f5899f8c0de5e942ac5'/>
<id>797648b968a85d6d79253f5899f8c0de5e942ac5</id>
<content type='text'>
[ Upstream commit ad6b1d914a9e07f3b9a9ae3396f3c840d0070539 ]

The problem seems to be that if a new device is detected
while we have already removed the shared HCD, then many of the
xhci operations (e.g.  xhci_alloc_dev(), xhci_setup_device())
hang as command never completes.

I don't think XHCI can operate without the shared HCD as we've
already called xhci_halt() in xhci_only_stop_hcd() when shared HCD
goes away. We need to prevent new commands from being queued
not only when HCD is dying but also when HCD is halted.

The following lockup was detected while testing the otg state
machine.

[  178.199951] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[  178.205799] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 1
[  178.214458] xhci-hcd xhci-hcd.0.auto: hcc params 0x0220f04c hci version 0x100 quirks 0x00010010
[  178.223619] xhci-hcd xhci-hcd.0.auto: irq 400, io mem 0x48890000
[  178.230677] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[  178.237796] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[  178.245358] usb usb1: Product: xHCI Host Controller
[  178.250483] usb usb1: Manufacturer: Linux 4.0.0-rc1-00024-g6111320 xhci-hcd
[  178.257783] usb usb1: SerialNumber: xhci-hcd.0.auto
[  178.267014] hub 1-0:1.0: USB hub found
[  178.272108] hub 1-0:1.0: 1 port detected
[  178.278371] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[  178.284171] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 2
[  178.294038] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003
[  178.301183] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[  178.308776] usb usb2: Product: xHCI Host Controller
[  178.313902] usb usb2: Manufacturer: Linux 4.0.0-rc1-00024-g6111320 xhci-hcd
[  178.321222] usb usb2: SerialNumber: xhci-hcd.0.auto
[  178.329061] hub 2-0:1.0: USB hub found
[  178.333126] hub 2-0:1.0: 1 port detected
[  178.567585] dwc3 48890000.usb: usb_otg_start_host 0
[  178.572707] xhci-hcd xhci-hcd.0.auto: remove, state 4
[  178.578064] usb usb2: USB disconnect, device number 1
[  178.586565] xhci-hcd xhci-hcd.0.auto: USB bus 2 deregistered
[  178.592585] xhci-hcd xhci-hcd.0.auto: remove, state 1
[  178.597924] usb usb1: USB disconnect, device number 1
[  178.603248] usb 1-1: new high-speed USB device number 2 using xhci-hcd
[  190.597337] INFO: task kworker/u4:0:6 blocked for more than 10 seconds.
[  190.604273]       Not tainted 4.0.0-rc1-00024-g6111320 #1058
[  190.610228] "echo 0 &gt; /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[  190.618443] kworker/u4:0    D c05c0ac0     0     6      2 0x00000000
[  190.625120] Workqueue: usb_otg usb_otg_work
[  190.629533] [&lt;c05c0ac0&gt;] (__schedule) from [&lt;c05c10ac&gt;] (schedule+0x34/0x98)
[  190.636915] [&lt;c05c10ac&gt;] (schedule) from [&lt;c05c1318&gt;] (schedule_preempt_disabled+0xc/0x10)
[  190.645591] [&lt;c05c1318&gt;] (schedule_preempt_disabled) from [&lt;c05c23d0&gt;] (mutex_lock_nested+0x1ac/0x3fc)
[  190.655353] [&lt;c05c23d0&gt;] (mutex_lock_nested) from [&lt;c046cf8c&gt;] (usb_disconnect+0x3c/0x208)
[  190.664043] [&lt;c046cf8c&gt;] (usb_disconnect) from [&lt;c0470cf0&gt;] (_usb_remove_hcd+0x98/0x1d8)
[  190.672535] [&lt;c0470cf0&gt;] (_usb_remove_hcd) from [&lt;c0485da8&gt;] (usb_otg_start_host+0x50/0xf4)
[  190.681299] [&lt;c0485da8&gt;] (usb_otg_start_host) from [&lt;c04849a4&gt;] (otg_set_protocol+0x5c/0xd0)
[  190.690153] [&lt;c04849a4&gt;] (otg_set_protocol) from [&lt;c0484b88&gt;] (otg_set_state+0x170/0xbfc)
[  190.698735] [&lt;c0484b88&gt;] (otg_set_state) from [&lt;c0485740&gt;] (otg_statemachine+0x12c/0x470)
[  190.707326] [&lt;c0485740&gt;] (otg_statemachine) from [&lt;c0053c84&gt;] (process_one_work+0x1b4/0x4a0)
[  190.716162] [&lt;c0053c84&gt;] (process_one_work) from [&lt;c00540f8&gt;] (worker_thread+0x154/0x44c)
[  190.724742] [&lt;c00540f8&gt;] (worker_thread) from [&lt;c0058f88&gt;] (kthread+0xd4/0xf0)
[  190.732328] [&lt;c0058f88&gt;] (kthread) from [&lt;c000e810&gt;] (ret_from_fork+0x14/0x24)
[  190.739898] 5 locks held by kworker/u4:0/6:
[  190.744274]  #0:  ("%s""usb_otg"){.+.+.+}, at: [&lt;c0053bf4&gt;] process_one_work+0x124/0x4a0
[  190.752799]  #1:  ((&amp;otgd-&gt;work)){+.+.+.}, at: [&lt;c0053bf4&gt;] process_one_work+0x124/0x4a0
[  190.761326]  #2:  (&amp;otgd-&gt;fsm.lock){+.+.+.}, at: [&lt;c048562c&gt;] otg_statemachine+0x18/0x470
[  190.769934]  #3:  (usb_bus_list_lock){+.+.+.}, at: [&lt;c0470ce8&gt;] _usb_remove_hcd+0x90/0x1d8
[  190.778635]  #4:  (&amp;dev-&gt;mutex){......}, at: [&lt;c046cf8c&gt;] usb_disconnect+0x3c/0x208
[  190.786700] INFO: task kworker/1:0:14 blocked for more than 10 seconds.
[  190.793633]       Not tainted 4.0.0-rc1-00024-g6111320 #1058
[  190.799567] "echo 0 &gt; /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[  190.807783] kworker/1:0     D c05c0ac0     0    14      2 0x00000000
[  190.814457] Workqueue: usb_hub_wq hub_event
[  190.818866] [&lt;c05c0ac0&gt;] (__schedule) from [&lt;c05c10ac&gt;] (schedule+0x34/0x98)
[  190.826252] [&lt;c05c10ac&gt;] (schedule) from [&lt;c05c4e40&gt;] (schedule_timeout+0x13c/0x1ec)
[  190.834377] [&lt;c05c4e40&gt;] (schedule_timeout) from [&lt;c05c19f0&gt;] (wait_for_common+0xbc/0x150)
[  190.843062] [&lt;c05c19f0&gt;] (wait_for_common) from [&lt;bf068a3c&gt;] (xhci_setup_device+0x164/0x5cc [xhci_hcd])
[  190.852986] [&lt;bf068a3c&gt;] (xhci_setup_device [xhci_hcd]) from [&lt;c046b7f4&gt;] (hub_port_init+0x3f4/0xb10)
[  190.862667] [&lt;c046b7f4&gt;] (hub_port_init) from [&lt;c046eb64&gt;] (hub_event+0x704/0x1018)
[  190.870704] [&lt;c046eb64&gt;] (hub_event) from [&lt;c0053c84&gt;] (process_one_work+0x1b4/0x4a0)
[  190.878919] [&lt;c0053c84&gt;] (process_one_work) from [&lt;c00540f8&gt;] (worker_thread+0x154/0x44c)
[  190.887503] [&lt;c00540f8&gt;] (worker_thread) from [&lt;c0058f88&gt;] (kthread+0xd4/0xf0)
[  190.895076] [&lt;c0058f88&gt;] (kthread) from [&lt;c000e810&gt;] (ret_from_fork+0x14/0x24)
[  190.902650] 5 locks held by kworker/1:0/14:
[  190.907023]  #0:  ("usb_hub_wq"){.+.+.+}, at: [&lt;c0053bf4&gt;] process_one_work+0x124/0x4a0
[  190.915454]  #1:  ((&amp;hub-&gt;events)){+.+.+.}, at: [&lt;c0053bf4&gt;] process_one_work+0x124/0x4a0
[  190.924070]  #2:  (&amp;dev-&gt;mutex){......}, at: [&lt;c046e490&gt;] hub_event+0x30/0x1018
[  190.931768]  #3:  (&amp;port_dev-&gt;status_lock){+.+.+.}, at: [&lt;c046eb50&gt;] hub_event+0x6f0/0x1018
[  190.940558]  #4:  (&amp;bus-&gt;usb_address0_mutex){+.+.+.}, at: [&lt;c046b458&gt;] hub_port_init+0x58/0xb10

Signed-off-by: Roger Quadros &lt;rogerq@ti.com&gt;
Signed-off-by: Mathias Nyman &lt;mathias.nyman@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit ad6b1d914a9e07f3b9a9ae3396f3c840d0070539 ]

The problem seems to be that if a new device is detected
while we have already removed the shared HCD, then many of the
xhci operations (e.g.  xhci_alloc_dev(), xhci_setup_device())
hang as command never completes.

I don't think XHCI can operate without the shared HCD as we've
already called xhci_halt() in xhci_only_stop_hcd() when shared HCD
goes away. We need to prevent new commands from being queued
not only when HCD is dying but also when HCD is halted.

The following lockup was detected while testing the otg state
machine.

[  178.199951] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[  178.205799] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 1
[  178.214458] xhci-hcd xhci-hcd.0.auto: hcc params 0x0220f04c hci version 0x100 quirks 0x00010010
[  178.223619] xhci-hcd xhci-hcd.0.auto: irq 400, io mem 0x48890000
[  178.230677] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[  178.237796] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[  178.245358] usb usb1: Product: xHCI Host Controller
[  178.250483] usb usb1: Manufacturer: Linux 4.0.0-rc1-00024-g6111320 xhci-hcd
[  178.257783] usb usb1: SerialNumber: xhci-hcd.0.auto
[  178.267014] hub 1-0:1.0: USB hub found
[  178.272108] hub 1-0:1.0: 1 port detected
[  178.278371] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[  178.284171] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 2
[  178.294038] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003
[  178.301183] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[  178.308776] usb usb2: Product: xHCI Host Controller
[  178.313902] usb usb2: Manufacturer: Linux 4.0.0-rc1-00024-g6111320 xhci-hcd
[  178.321222] usb usb2: SerialNumber: xhci-hcd.0.auto
[  178.329061] hub 2-0:1.0: USB hub found
[  178.333126] hub 2-0:1.0: 1 port detected
[  178.567585] dwc3 48890000.usb: usb_otg_start_host 0
[  178.572707] xhci-hcd xhci-hcd.0.auto: remove, state 4
[  178.578064] usb usb2: USB disconnect, device number 1
[  178.586565] xhci-hcd xhci-hcd.0.auto: USB bus 2 deregistered
[  178.592585] xhci-hcd xhci-hcd.0.auto: remove, state 1
[  178.597924] usb usb1: USB disconnect, device number 1
[  178.603248] usb 1-1: new high-speed USB device number 2 using xhci-hcd
[  190.597337] INFO: task kworker/u4:0:6 blocked for more than 10 seconds.
[  190.604273]       Not tainted 4.0.0-rc1-00024-g6111320 #1058
[  190.610228] "echo 0 &gt; /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[  190.618443] kworker/u4:0    D c05c0ac0     0     6      2 0x00000000
[  190.625120] Workqueue: usb_otg usb_otg_work
[  190.629533] [&lt;c05c0ac0&gt;] (__schedule) from [&lt;c05c10ac&gt;] (schedule+0x34/0x98)
[  190.636915] [&lt;c05c10ac&gt;] (schedule) from [&lt;c05c1318&gt;] (schedule_preempt_disabled+0xc/0x10)
[  190.645591] [&lt;c05c1318&gt;] (schedule_preempt_disabled) from [&lt;c05c23d0&gt;] (mutex_lock_nested+0x1ac/0x3fc)
[  190.655353] [&lt;c05c23d0&gt;] (mutex_lock_nested) from [&lt;c046cf8c&gt;] (usb_disconnect+0x3c/0x208)
[  190.664043] [&lt;c046cf8c&gt;] (usb_disconnect) from [&lt;c0470cf0&gt;] (_usb_remove_hcd+0x98/0x1d8)
[  190.672535] [&lt;c0470cf0&gt;] (_usb_remove_hcd) from [&lt;c0485da8&gt;] (usb_otg_start_host+0x50/0xf4)
[  190.681299] [&lt;c0485da8&gt;] (usb_otg_start_host) from [&lt;c04849a4&gt;] (otg_set_protocol+0x5c/0xd0)
[  190.690153] [&lt;c04849a4&gt;] (otg_set_protocol) from [&lt;c0484b88&gt;] (otg_set_state+0x170/0xbfc)
[  190.698735] [&lt;c0484b88&gt;] (otg_set_state) from [&lt;c0485740&gt;] (otg_statemachine+0x12c/0x470)
[  190.707326] [&lt;c0485740&gt;] (otg_statemachine) from [&lt;c0053c84&gt;] (process_one_work+0x1b4/0x4a0)
[  190.716162] [&lt;c0053c84&gt;] (process_one_work) from [&lt;c00540f8&gt;] (worker_thread+0x154/0x44c)
[  190.724742] [&lt;c00540f8&gt;] (worker_thread) from [&lt;c0058f88&gt;] (kthread+0xd4/0xf0)
[  190.732328] [&lt;c0058f88&gt;] (kthread) from [&lt;c000e810&gt;] (ret_from_fork+0x14/0x24)
[  190.739898] 5 locks held by kworker/u4:0/6:
[  190.744274]  #0:  ("%s""usb_otg"){.+.+.+}, at: [&lt;c0053bf4&gt;] process_one_work+0x124/0x4a0
[  190.752799]  #1:  ((&amp;otgd-&gt;work)){+.+.+.}, at: [&lt;c0053bf4&gt;] process_one_work+0x124/0x4a0
[  190.761326]  #2:  (&amp;otgd-&gt;fsm.lock){+.+.+.}, at: [&lt;c048562c&gt;] otg_statemachine+0x18/0x470
[  190.769934]  #3:  (usb_bus_list_lock){+.+.+.}, at: [&lt;c0470ce8&gt;] _usb_remove_hcd+0x90/0x1d8
[  190.778635]  #4:  (&amp;dev-&gt;mutex){......}, at: [&lt;c046cf8c&gt;] usb_disconnect+0x3c/0x208
[  190.786700] INFO: task kworker/1:0:14 blocked for more than 10 seconds.
[  190.793633]       Not tainted 4.0.0-rc1-00024-g6111320 #1058
[  190.799567] "echo 0 &gt; /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[  190.807783] kworker/1:0     D c05c0ac0     0    14      2 0x00000000
[  190.814457] Workqueue: usb_hub_wq hub_event
[  190.818866] [&lt;c05c0ac0&gt;] (__schedule) from [&lt;c05c10ac&gt;] (schedule+0x34/0x98)
[  190.826252] [&lt;c05c10ac&gt;] (schedule) from [&lt;c05c4e40&gt;] (schedule_timeout+0x13c/0x1ec)
[  190.834377] [&lt;c05c4e40&gt;] (schedule_timeout) from [&lt;c05c19f0&gt;] (wait_for_common+0xbc/0x150)
[  190.843062] [&lt;c05c19f0&gt;] (wait_for_common) from [&lt;bf068a3c&gt;] (xhci_setup_device+0x164/0x5cc [xhci_hcd])
[  190.852986] [&lt;bf068a3c&gt;] (xhci_setup_device [xhci_hcd]) from [&lt;c046b7f4&gt;] (hub_port_init+0x3f4/0xb10)
[  190.862667] [&lt;c046b7f4&gt;] (hub_port_init) from [&lt;c046eb64&gt;] (hub_event+0x704/0x1018)
[  190.870704] [&lt;c046eb64&gt;] (hub_event) from [&lt;c0053c84&gt;] (process_one_work+0x1b4/0x4a0)
[  190.878919] [&lt;c0053c84&gt;] (process_one_work) from [&lt;c00540f8&gt;] (worker_thread+0x154/0x44c)
[  190.887503] [&lt;c00540f8&gt;] (worker_thread) from [&lt;c0058f88&gt;] (kthread+0xd4/0xf0)
[  190.895076] [&lt;c0058f88&gt;] (kthread) from [&lt;c000e810&gt;] (ret_from_fork+0x14/0x24)
[  190.902650] 5 locks held by kworker/1:0/14:
[  190.907023]  #0:  ("usb_hub_wq"){.+.+.+}, at: [&lt;c0053bf4&gt;] process_one_work+0x124/0x4a0
[  190.915454]  #1:  ((&amp;hub-&gt;events)){+.+.+.}, at: [&lt;c0053bf4&gt;] process_one_work+0x124/0x4a0
[  190.924070]  #2:  (&amp;dev-&gt;mutex){......}, at: [&lt;c046e490&gt;] hub_event+0x30/0x1018
[  190.931768]  #3:  (&amp;port_dev-&gt;status_lock){+.+.+.}, at: [&lt;c046eb50&gt;] hub_event+0x6f0/0x1018
[  190.940558]  #4:  (&amp;bus-&gt;usb_address0_mutex){+.+.+.}, at: [&lt;c046b458&gt;] hub_port_init+0x58/0xb10

Signed-off-by: Roger Quadros &lt;rogerq@ti.com&gt;
Signed-off-by: Mathias Nyman &lt;mathias.nyman@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
