<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers, branch v4.4.74</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v4.4.74</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v4.4.74'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2017-06-26T05:13:10+00:00</updated>
<entry>
<title>usb: dwc3: exynos fix axius clock error path to do cleanup</title>
<updated>2017-06-26T05:13:10+00:00</updated>
<author>
<name>Shuah Khan</name>
<email>shuahkh@osg.samsung.com</email>
</author>
<published>2017-01-10T23:05:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=94695386c79caccd82bf4048da642e6c9643fb92'/>
<id>urn:sha1:94695386c79caccd82bf4048da642e6c9643fb92</id>
<content type='text'>
commit 8ae584d1951f241efd45499f8774fd7066f22823 upstream.

Axius clock error path returns without disabling clock and suspend clock.
Fix it to disable them before returning error.

Reviewed-by: Javier Martinez Canillas &lt;javier@osg.samsung.com&gt;
Signed-off-by: Shuah Khan &lt;shuahkh@osg.samsung.com&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@verizon.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>USB: gadgetfs, dummy-hcd, net2280: fix locking for callbacks</title>
<updated>2017-06-26T05:13:10+00:00</updated>
<author>
<name>Alan Stern</name>
<email>stern@rowland.harvard.edu</email>
</author>
<published>2017-06-13T19:23:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f5dc61753d0e27705ff79813f0f0714fd5bd37bb'/>
<id>urn:sha1:f5dc61753d0e27705ff79813f0f0714fd5bd37bb</id>
<content type='text'>
commit f16443a034c7aa359ddf6f0f9bc40d01ca31faea upstream.

Using the syzkaller kernel fuzzer, Andrey Konovalov generated the
following error in gadgetfs:

&gt; BUG: KASAN: use-after-free in __lock_acquire+0x3069/0x3690
&gt; kernel/locking/lockdep.c:3246
&gt; Read of size 8 at addr ffff88003a2bdaf8 by task kworker/3:1/903
&gt;
&gt; CPU: 3 PID: 903 Comm: kworker/3:1 Not tainted 4.12.0-rc4+ #35
&gt; Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011
&gt; Workqueue: usb_hub_wq hub_event
&gt; Call Trace:
&gt;  __dump_stack lib/dump_stack.c:16 [inline]
&gt;  dump_stack+0x292/0x395 lib/dump_stack.c:52
&gt;  print_address_description+0x78/0x280 mm/kasan/report.c:252
&gt;  kasan_report_error mm/kasan/report.c:351 [inline]
&gt;  kasan_report+0x230/0x340 mm/kasan/report.c:408
&gt;  __asan_report_load8_noabort+0x19/0x20 mm/kasan/report.c:429
&gt;  __lock_acquire+0x3069/0x3690 kernel/locking/lockdep.c:3246
&gt;  lock_acquire+0x22d/0x560 kernel/locking/lockdep.c:3855
&gt;  __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline]
&gt;  _raw_spin_lock+0x2f/0x40 kernel/locking/spinlock.c:151
&gt;  spin_lock include/linux/spinlock.h:299 [inline]
&gt;  gadgetfs_suspend+0x89/0x130 drivers/usb/gadget/legacy/inode.c:1682
&gt;  set_link_state+0x88e/0xae0 drivers/usb/gadget/udc/dummy_hcd.c:455
&gt;  dummy_hub_control+0xd7e/0x1fb0 drivers/usb/gadget/udc/dummy_hcd.c:2074
&gt;  rh_call_control drivers/usb/core/hcd.c:689 [inline]
&gt;  rh_urb_enqueue drivers/usb/core/hcd.c:846 [inline]
&gt;  usb_hcd_submit_urb+0x92f/0x20b0 drivers/usb/core/hcd.c:1650
&gt;  usb_submit_urb+0x8b2/0x12c0 drivers/usb/core/urb.c:542
&gt;  usb_start_wait_urb+0x148/0x5b0 drivers/usb/core/message.c:56
&gt;  usb_internal_control_msg drivers/usb/core/message.c:100 [inline]
&gt;  usb_control_msg+0x341/0x4d0 drivers/usb/core/message.c:151
&gt;  usb_clear_port_feature+0x74/0xa0 drivers/usb/core/hub.c:412
&gt;  hub_port_disable+0x123/0x510 drivers/usb/core/hub.c:4177
&gt;  hub_port_init+0x1ed/0x2940 drivers/usb/core/hub.c:4648
&gt;  hub_port_connect drivers/usb/core/hub.c:4826 [inline]
&gt;  hub_port_connect_change drivers/usb/core/hub.c:4999 [inline]
&gt;  port_event drivers/usb/core/hub.c:5105 [inline]
&gt;  hub_event+0x1ae1/0x3d40 drivers/usb/core/hub.c:5185
&gt;  process_one_work+0xc08/0x1bd0 kernel/workqueue.c:2097
&gt;  process_scheduled_works kernel/workqueue.c:2157 [inline]
&gt;  worker_thread+0xb2b/0x1860 kernel/workqueue.c:2233
&gt;  kthread+0x363/0x440 kernel/kthread.c:231
&gt;  ret_from_fork+0x2a/0x40 arch/x86/entry/entry_64.S:424
&gt;
&gt; Allocated by task 9958:
&gt;  save_stack_trace+0x1b/0x20 arch/x86/kernel/stacktrace.c:59
&gt;  save_stack+0x43/0xd0 mm/kasan/kasan.c:513
&gt;  set_track mm/kasan/kasan.c:525 [inline]
&gt;  kasan_kmalloc+0xad/0xe0 mm/kasan/kasan.c:617
&gt;  kmem_cache_alloc_trace+0x87/0x280 mm/slub.c:2745
&gt;  kmalloc include/linux/slab.h:492 [inline]
&gt;  kzalloc include/linux/slab.h:665 [inline]
&gt;  dev_new drivers/usb/gadget/legacy/inode.c:170 [inline]
&gt;  gadgetfs_fill_super+0x24f/0x540 drivers/usb/gadget/legacy/inode.c:1993
&gt;  mount_single+0xf6/0x160 fs/super.c:1192
&gt;  gadgetfs_mount+0x31/0x40 drivers/usb/gadget/legacy/inode.c:2019
&gt;  mount_fs+0x9c/0x2d0 fs/super.c:1223
&gt;  vfs_kern_mount.part.25+0xcb/0x490 fs/namespace.c:976
&gt;  vfs_kern_mount fs/namespace.c:2509 [inline]
&gt;  do_new_mount fs/namespace.c:2512 [inline]
&gt;  do_mount+0x41b/0x2d90 fs/namespace.c:2834
&gt;  SYSC_mount fs/namespace.c:3050 [inline]
&gt;  SyS_mount+0xb0/0x120 fs/namespace.c:3027
&gt;  entry_SYSCALL_64_fastpath+0x1f/0xbe
&gt;
&gt; Freed by task 9960:
&gt;  save_stack_trace+0x1b/0x20 arch/x86/kernel/stacktrace.c:59
&gt;  save_stack+0x43/0xd0 mm/kasan/kasan.c:513
&gt;  set_track mm/kasan/kasan.c:525 [inline]
&gt;  kasan_slab_free+0x72/0xc0 mm/kasan/kasan.c:590
&gt;  slab_free_hook mm/slub.c:1357 [inline]
&gt;  slab_free_freelist_hook mm/slub.c:1379 [inline]
&gt;  slab_free mm/slub.c:2961 [inline]
&gt;  kfree+0xed/0x2b0 mm/slub.c:3882
&gt;  put_dev+0x124/0x160 drivers/usb/gadget/legacy/inode.c:163
&gt;  gadgetfs_kill_sb+0x33/0x60 drivers/usb/gadget/legacy/inode.c:2027
&gt;  deactivate_locked_super+0x8d/0xd0 fs/super.c:309
&gt;  deactivate_super+0x21e/0x310 fs/super.c:340
&gt;  cleanup_mnt+0xb7/0x150 fs/namespace.c:1112
&gt;  __cleanup_mnt+0x1b/0x20 fs/namespace.c:1119
&gt;  task_work_run+0x1a0/0x280 kernel/task_work.c:116
&gt;  exit_task_work include/linux/task_work.h:21 [inline]
&gt;  do_exit+0x18a8/0x2820 kernel/exit.c:878
&gt;  do_group_exit+0x14e/0x420 kernel/exit.c:982
&gt;  get_signal+0x784/0x1780 kernel/signal.c:2318
&gt;  do_signal+0xd7/0x2130 arch/x86/kernel/signal.c:808
&gt;  exit_to_usermode_loop+0x1ac/0x240 arch/x86/entry/common.c:157
&gt;  prepare_exit_to_usermode arch/x86/entry/common.c:194 [inline]
&gt;  syscall_return_slowpath+0x3ba/0x410 arch/x86/entry/common.c:263
&gt;  entry_SYSCALL_64_fastpath+0xbc/0xbe
&gt;
&gt; The buggy address belongs to the object at ffff88003a2bdae0
&gt;  which belongs to the cache kmalloc-1024 of size 1024
&gt; The buggy address is located 24 bytes inside of
&gt;  1024-byte region [ffff88003a2bdae0, ffff88003a2bdee0)
&gt; The buggy address belongs to the page:
&gt; page:ffffea0000e8ae00 count:1 mapcount:0 mapping:          (null)
&gt; index:0x0 compound_mapcount: 0
&gt; flags: 0x100000000008100(slab|head)
&gt; raw: 0100000000008100 0000000000000000 0000000000000000 0000000100170017
&gt; raw: ffffea0000ed3020 ffffea0000f5f820 ffff88003e80efc0 0000000000000000
&gt; page dumped because: kasan: bad access detected
&gt;
&gt; Memory state around the buggy address:
&gt;  ffff88003a2bd980: fb fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
&gt;  ffff88003a2bda00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
&gt; &gt;ffff88003a2bda80: fc fc fc fc fc fc fc fc fc fc fc fc fb fb fb fb
&gt;                                                                 ^
&gt;  ffff88003a2bdb00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
&gt;  ffff88003a2bdb80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
&gt; ==================================================================

What this means is that the gadgetfs_suspend() routine was trying to
access dev-&gt;lock after it had been deallocated.  The root cause is a
race in the dummy_hcd driver; the dummy_udc_stop() routine can race
with the rest of the driver because it contains no locking.  And even
when proper locking is added, it can still race with the
set_link_state() function because that function incorrectly drops the
private spinlock before invoking any gadget driver callbacks.

The result of this race, as seen above, is that set_link_state() can
invoke a callback in gadgetfs even after gadgetfs has been unbound
from dummy_hcd's UDC and its private data structures have been
deallocated.

include/linux/usb/gadget.h documents that the -&gt;reset, -&gt;disconnect,
-&gt;suspend, and -&gt;resume callbacks may be invoked in interrupt context.
In general this is necessary, to prevent races with gadget driver
removal.  This patch fixes dummy_hcd to retain the spinlock across
these calls, and it adds a spinlock acquisition to dummy_udc_stop() to
prevent the race.

The net2280 driver makes the same mistake of dropping the private
spinlock for its -&gt;disconnect and -&gt;reset callback invocations.  The
patch fixes it too.

Lastly, since gadgetfs_suspend() may be invoked in interrupt context,
it cannot assume that interrupts are enabled when it runs.  It must
use spin_lock_irqsave() instead of spin_lock_irq().  The patch fixes
that bug as well.

Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Reported-and-tested-by: Andrey Konovalov &lt;andreyknvl@google.com&gt;
Acked-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>usb: xhci: ASMedia ASM1042A chipset need shorts TX quirk</title>
<updated>2017-06-26T05:13:10+00:00</updated>
<author>
<name>Corentin Labbe</name>
<email>clabbe.montjoie@gmail.com</email>
</author>
<published>2017-06-09T11:48:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=89c15994a06d996f4917c3c122a4e8446a205422'/>
<id>urn:sha1:89c15994a06d996f4917c3c122a4e8446a205422</id>
<content type='text'>
commit d2f48f05cd2a2a0a708fbfa45f1a00a87660d937 upstream.

When plugging an USB webcam I see the following message:
[106385.615559] xhci_hcd 0000:04:00.0: WARN Successful completion on short TX: needs XHCI_TRUST_TX_LENGTH quirk?
[106390.583860] handle_tx_event: 913 callbacks suppressed

With this patch applied, I get no more printing of this message.

Signed-off-by: Corentin Labbe &lt;clabbe.montjoie@gmail.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;

</content>
</entry>
<entry>
<title>drivers/misc/c2port/c2port-duramar2150.c: checking for NULL instead of IS_ERR()</title>
<updated>2017-06-26T05:13:10+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2017-05-08T22:55:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5efd37fe72186ef821f265dd50779ad1e2bbbec6'/>
<id>urn:sha1:5efd37fe72186ef821f265dd50779ad1e2bbbec6</id>
<content type='text'>
commit 8128a31eaadbcdfa37774bbd28f3f00bac69996a upstream.

c2port_device_register() never returns NULL, it uses error pointers.

Link: http://lkml.kernel.org/r/20170412083321.GC3250@mwanda
Fixes: 65131cd52b9e ("c2port: add c2port support for Eurotech Duramar 2150")
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Acked-by: Rodolfo Giometti &lt;giometti@linux.it&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>usb: r8a66597-hcd: decrease timeout</title>
<updated>2017-06-26T05:13:10+00:00</updated>
<author>
<name>Chris Brandt</name>
<email>chris.brandt@renesas.com</email>
</author>
<published>2017-04-27T19:12:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ab29b21a47ae9a057f66b58b06353ec459dcfb3a'/>
<id>urn:sha1:ab29b21a47ae9a057f66b58b06353ec459dcfb3a</id>
<content type='text'>
commit dd14a3e9b92ac6f0918054f9e3477438760a4fa6 upstream.

The timeout for BULK packets was 300ms which is a long time if other
endpoints or devices are waiting for their turn. Changing it to 50ms
greatly increased the overall performance for multi-endpoint devices.

Fixes: 5d3043586db4 ("usb: r8a66597-hcd: host controller driver for R8A6659")
Signed-off-by: Chris Brandt &lt;chris.brandt@renesas.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>usb: r8a66597-hcd: select a different endpoint on timeout</title>
<updated>2017-06-26T05:13:10+00:00</updated>
<author>
<name>Chris Brandt</name>
<email>chris.brandt@renesas.com</email>
</author>
<published>2017-04-27T19:12:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4c7a6dd205cc7e6e7e95f5d7b7b0a9a7a3fcf5e9'/>
<id>urn:sha1:4c7a6dd205cc7e6e7e95f5d7b7b0a9a7a3fcf5e9</id>
<content type='text'>
commit 1f873d857b6c2fefb4dada952674aa01bcfb92bd upstream.

If multiple endpoints on a single device have pending IN URBs and one
endpoint times out due to NAKs (perfectly legal), select a different
endpoint URB to try.
The existing code only checked to see another device address has pending
URBs and ignores other IN endpoints on the current device address. This
leads to endpoints never getting serviced if one endpoint is using NAK as
a flow control method.

Fixes: 5d3043586db4 ("usb: r8a66597-hcd: host controller driver for R8A6659")
Signed-off-by: Chris Brandt &lt;chris.brandt@renesas.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>USB: gadget: dummy_hcd: fix hub-descriptor removable fields</title>
<updated>2017-06-26T05:13:10+00:00</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2017-05-10T16:18:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=42c8b4b5fdca31b47d2c55e716f651e2600690ca'/>
<id>urn:sha1:42c8b4b5fdca31b47d2c55e716f651e2600690ca</id>
<content type='text'>
commit d81182ce30dbd497a1e7047d7fda2af040347790 upstream.

Flag the first and only port as removable while also leaving the
remaining bits (including the reserved bit zero) unset in accordance
with the specifications:

	"Within a byte, if no port exists for a given location, the bit
	field representing the port characteristics shall be 0."

Also add a comment marking the legacy PortPwrCtrlMask field.

Fixes: 1cd8fd2887e1 ("usb: gadget: dummy_hcd: add SuperSpeed support")
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Cc: Tatyana Brokhman &lt;tlinder@codeaurora.org&gt;
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
Acked-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>pvrusb2: reduce stack usage pvr2_eeprom_analyze()</title>
<updated>2017-06-26T05:13:09+00:00</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2017-02-02T14:53:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=dc6ecba3f6c14f493ea3be29b09415d26c8783c2'/>
<id>urn:sha1:dc6ecba3f6c14f493ea3be29b09415d26c8783c2</id>
<content type='text'>
commit 6830733d53a4517588e56227b9c8538633f0c496 upstream.

The driver uses a relatively large data structure on the stack, which
showed up on my radar as we get a warning with the "latent entropy"
GCC plugin:

drivers/media/usb/pvrusb2/pvrusb2-eeprom.c:153:1: error: the frame size of 1376 bytes is larger than 1152 bytes [-Werror=frame-larger-than=]

The warning is usually hidden as we raise the warning limit to 2048
when the plugin is enabled, but I'd like to lower that again in the
future, and making this function smaller helps to do that without
build regressions.

Further analysis shows that putting an 'i2c_client' structure on
the stack is not really supported, as the embedded 'struct device'
is not initialized here, and we are only saved by the fact that
the function that is called here does not use the pointer at all.

Fixes: d855497edbfb ("V4L/DVB (4228a): pvrusb2 to kernel 2.6.18")

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Hans Verkuil &lt;hans.verkuil@cisco.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@s-opensource.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>usb: core: fix potential memory leak in error path during hcd creation</title>
<updated>2017-06-26T05:13:09+00:00</updated>
<author>
<name>Anton Bondarenko</name>
<email>anton.bondarenko.sama@gmail.com</email>
</author>
<published>2017-05-06T23:53:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e33e866d1593281d9122fa1769ea01f4ec4e7dec'/>
<id>urn:sha1:e33e866d1593281d9122fa1769ea01f4ec4e7dec</id>
<content type='text'>
commit 1a744d2eb76aaafb997fda004ae3ae62a1538f85 upstream.

Free memory allocated for address0_mutex if allocation of bandwidth_mutex
failed.

Fixes: feb26ac31a2a ("usb: core: hub: hub_port_init lock controller instead of bus")

Signed-off-by: Anton Bondarenko &lt;anton.bondarenko.sama@gmail.com&gt;
Acked-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>USB: hub: fix SS max number of ports</title>
<updated>2017-06-26T05:13:09+00:00</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2017-05-10T16:18:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ec443ee0c2aa3c1748de683bcda3714bb4d37010'/>
<id>urn:sha1:ec443ee0c2aa3c1748de683bcda3714bb4d37010</id>
<content type='text'>
commit 93491ced3c87c94b12220dbac0527e1356702179 upstream.

Add define for the maximum number of ports on a SuperSpeed hub as per
USB 3.1 spec Table 10-5, and use it when verifying the retrieved hub
descriptor.

This specifically avoids benign attempts to update the DeviceRemovable
mask for non-existing ports (should we get that far).

Fixes: dbe79bbe9dcb ("USB 3.0 Hub Changes")
Acked-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
</feed>
