<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/usb, branch v5.17</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v5.17</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.17'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2022-03-19T17:16:33Z</updated>
<entry>
<title>Merge tag 'usb-5.17-final' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb</title>
<updated>2022-03-19T17:16:33Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2022-03-19T17:16:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6aa61c12a43bb365296e72251e7346b661030b52'/>
<id>urn:sha1:6aa61c12a43bb365296e72251e7346b661030b52</id>
<content type='text'>
Pull USB fixes from Greg KH:
 "Here are some small remaining USB fixes for 5.17-final.

  They include:

   - two USB gadget driver fixes for reported problems

   - usbtmc driver fix for syzbot found issues

   - musb patch partial revert to resolve a reported regression.

  All of these have been in linux-next this week with no reported
  problems"

* tag 'usb-5.17-final' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
  usb: gadget: Fix use-after-free bug by not setting udc-&gt;dev.driver
  usb: usbtmc: Fix bug in pipe direction for control transfers
  partially Revert "usb: musb: Set the DT node on the child device"
  usb: gadget: rndis: prevent integer overflow in rndis_set_response()
</content>
</entry>
<entry>
<title>usb: gadget: Fix use-after-free bug by not setting udc-&gt;dev.driver</title>
<updated>2022-03-15T17:46:01Z</updated>
<author>
<name>Alan Stern</name>
<email>stern@rowland.harvard.edu</email>
</author>
<published>2022-03-06T02:47:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=16b1941eac2bd499f065a6739a40ce0011a3d740'/>
<id>urn:sha1:16b1941eac2bd499f065a6739a40ce0011a3d740</id>
<content type='text'>
The syzbot fuzzer found a use-after-free bug:

BUG: KASAN: use-after-free in dev_uevent+0x712/0x780 drivers/base/core.c:2320
Read of size 8 at addr ffff88802b934098 by task udevd/3689

CPU: 2 PID: 3689 Comm: udevd Not tainted 5.17.0-rc4-syzkaller-00229-g4f12b742eb2b #0
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.14.0-2 04/01/2014
Call Trace:
 &lt;TASK&gt;
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106
 print_address_description.constprop.0.cold+0x8d/0x303 mm/kasan/report.c:255
 __kasan_report mm/kasan/report.c:442 [inline]
 kasan_report.cold+0x83/0xdf mm/kasan/report.c:459
 dev_uevent+0x712/0x780 drivers/base/core.c:2320
 uevent_show+0x1b8/0x380 drivers/base/core.c:2391
 dev_attr_show+0x4b/0x90 drivers/base/core.c:2094

Although the bug manifested in the driver core, the real cause was a
race with the gadget core.  dev_uevent() does:

	if (dev-&gt;driver)
		add_uevent_var(env, "DRIVER=%s", dev-&gt;driver-&gt;name);

and between the test and the dereference of dev-&gt;driver, the gadget
core sets dev-&gt;driver to NULL.

The race wouldn't occur if the gadget core registered its devices on
a real bus, using the standard synchronization techniques of the
driver core.  However, it's not necessary to make such a large change
in order to fix this bug; all we need to do is make sure that
udc-&gt;dev.driver is always NULL.

In fact, there is no reason for udc-&gt;dev.driver ever to be set to
anything, let alone to the value it currently gets: the address of the
gadget's driver.  After all, a gadget driver only knows how to manage
a gadget, not how to manage a UDC.

This patch simply removes the statements in the gadget core that touch
udc-&gt;dev.driver.

Fixes: 2ccea03a8f7e ("usb: gadget: introduce UDC Class")
CC: &lt;stable@vger.kernel.org&gt;
Reported-and-tested-by: syzbot+348b571beb5eeb70a582@syzkaller.appspotmail.com
Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Link: https://lore.kernel.org/r/YiQgukfFFbBnwJ/9@rowland.harvard.edu
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: usbtmc: Fix bug in pipe direction for control transfers</title>
<updated>2022-03-15T17:45:31Z</updated>
<author>
<name>Alan Stern</name>
<email>stern@rowland.harvard.edu</email>
</author>
<published>2022-03-03T21:00:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e9b667a82cdcfe21d590344447d65daed52b353b'/>
<id>urn:sha1:e9b667a82cdcfe21d590344447d65daed52b353b</id>
<content type='text'>
The syzbot fuzzer reported a minor bug in the usbtmc driver:

usb 5-1: BOGUS control dir, pipe 80001e80 doesn't match bRequestType 0
WARNING: CPU: 0 PID: 3813 at drivers/usb/core/urb.c:412
usb_submit_urb+0x13a5/0x1970 drivers/usb/core/urb.c:410
Modules linked in:
CPU: 0 PID: 3813 Comm: syz-executor122 Not tainted
5.17.0-rc5-syzkaller-00306-g2293be58d6a1 #0
...
Call Trace:
 &lt;TASK&gt;
 usb_start_wait_urb+0x113/0x530 drivers/usb/core/message.c:58
 usb_internal_control_msg drivers/usb/core/message.c:102 [inline]
 usb_control_msg+0x2a5/0x4b0 drivers/usb/core/message.c:153
 usbtmc_ioctl_request drivers/usb/class/usbtmc.c:1947 [inline]

The problem is that usbtmc_ioctl_request() uses usb_rcvctrlpipe() for
all of its transfers, whether they are in or out.  It's easy to fix.

CC: &lt;stable@vger.kernel.org&gt;
Reported-and-tested-by: syzbot+a48e3d1a875240cab5de@syzkaller.appspotmail.com
Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Link: https://lore.kernel.org/r/YiEsYTPEE6lOCOA5@rowland.harvard.edu
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>partially Revert "usb: musb: Set the DT node on the child device"</title>
<updated>2022-03-15T14:49:15Z</updated>
<author>
<name>H. Nikolaus Schaller</name>
<email>hns@goldelico.com</email>
</author>
<published>2022-03-08T12:56:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=239071064732bc4a30308cbba11014aa1aab550a'/>
<id>urn:sha1:239071064732bc4a30308cbba11014aa1aab550a</id>
<content type='text'>
This reverts the omap2430 changes of

commit cf081d009c44 ("usb: musb: Set the DT node on the child device")

Since v5.17-rc1, musb is broken on the gta04 and openpandora devices
(omap3530/dm3730). BeagleBone Black (am335x) seems to work.

Symptoms of this bug are

a) main symptom

[   21.336517] using random host ethernet address
[   21.341430] using host ethernet address: 32:70:05:18:ff:78
[   21.341461] using self ethernet address: 46:10:3a:b3:af:d9
[   21.358184] usb0: HOST MAC 32:70:05:18:ff:78
[   21.376678] usb0: MAC 46:10:3a:b3:af:d9
[   21.388305] using random self ethernet address
[   21.393371] using random host ethernet address
[   21.398162] g_ether gadget: Ethernet Gadget, version: Memorial Day 2008
[   21.421081] g_ether gadget: g_ether ready
[   21.492156] musb-hdrc musb-hdrc.1.auto: Could not enable: -22
[   21.691345] musb-hdrc musb-hdrc.1.auto: Could not enable: -22
[   21.803192] musb-hdrc musb-hdrc.1.auto: Could not enable: -22
[   21.819427] musb-hdrc musb-hdrc.1.auto: Could not enable: -22
[   22.124450] musb-hdrc musb-hdrc.1.auto: Could not enable: -22
[   22.168518] musb-hdrc musb-hdrc.1.auto: Could not enable: -22
[   22.179382] musb-hdrc musb-hdrc.1.auto: Could not enable: -22
[   23.213592] musb-hdrc musb-hdrc.1.auto: pm runtime get failed in musb_gadget_queue
[   23.221832] musb-hdrc musb-hdrc.1.auto: Could not enable: -22
[   23.227905] musb-hdrc musb-hdrc.1.auto: Could not enable: -22
[   23.239440] musb-hdrc musb-hdrc.1.auto: Could not enable: -22
[   23.401000] musb-hdrc musb-hdrc.1.auto: Could not enable: -22
[   23.407073] musb-hdrc musb-hdrc.1.auto: Could not enable: -22
[   23.426361] musb-hdrc musb-hdrc.1.auto: Could not enable: -22
[   23.734466] musb-hdrc musb-hdrc.1.auto: pm runtime get failed in musb_gadget_queue
[   23.742462] musb-hdrc musb-hdrc.1.auto: pm runtime get failed in musb_gadget_queue
[   23.750396] musb-hdrc musb-hdrc.1.auto: pm runtime get failed in musb_gadget_queue
... (repeats with high frequency)

This stops if the USB cable is unplugged and restarts if it is plugged in again.

b) also found in the log

[    6.498107] ------------[ cut here ]------------
[    6.502960] WARNING: CPU: 0 PID: 868 at arch/arm/mach-omap2/omap_hwmod.c:1885 _enable+0x50/0x234
[    6.512207] omap_hwmod: usb_otg_hs: enabled state can only be entered from initialized, idle, or disabled state
[    6.522766] Modules linked in: omap2430(+) bmp280_i2c bmp280 itg3200 at24 tsc2007 leds_tca6507 bma180 hmc5843_i2c hmc5843_core industrialio_triggered_buffer lis3lv02d_i2c kfifo_buf lis3lv02d phy_twl4030_usb snd_soc_omap_mcbsp snd_soc_ti_sdma musb_hdrc snd_soc_twl4030 gnss_sirf twl4030_vibra twl4030_madc twl4030_charger twl4030_pwrbutton gnss industrialio ehci_omap omapdrm drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops drm drm_panel_orientation_quirks cec
[    6.566436] CPU: 0 PID: 868 Comm: udevd Not tainted 5.16.0-rc5-letux+ #8251
[    6.573730] Hardware name: Generic OMAP36xx (Flattened Device Tree)
[    6.580322] [&lt;c010ed30&gt;] (unwind_backtrace) from [&lt;c010a1d0&gt;] (show_stack+0x10/0x14)
[    6.588470] [&lt;c010a1d0&gt;] (show_stack) from [&lt;c0897c14&gt;] (dump_stack_lvl+0x40/0x4c)
[    6.596405] [&lt;c0897c14&gt;] (dump_stack_lvl) from [&lt;c0130cc4&gt;] (__warn+0xb4/0xdc)
[    6.604003] [&lt;c0130cc4&gt;] (__warn) from [&lt;c0130d5c&gt;] (warn_slowpath_fmt+0x70/0x9c)
[    6.611846] [&lt;c0130d5c&gt;] (warn_slowpath_fmt) from [&lt;c011f4d4&gt;] (_enable+0x50/0x234)
[    6.619903] [&lt;c011f4d4&gt;] (_enable) from [&lt;c012081c&gt;] (omap_hwmod_enable+0x28/0x40)
[    6.627838] [&lt;c012081c&gt;] (omap_hwmod_enable) from [&lt;c0120ff4&gt;] (omap_device_enable+0x4c/0x78)
[    6.636779] [&lt;c0120ff4&gt;] (omap_device_enable) from [&lt;c0121030&gt;] (_od_runtime_resume+0x10/0x3c)
[    6.645812] [&lt;c0121030&gt;] (_od_runtime_resume) from [&lt;c05c688c&gt;] (__rpm_callback+0x3c/0xf4)
[    6.654510] [&lt;c05c688c&gt;] (__rpm_callback) from [&lt;c05c6994&gt;] (rpm_callback+0x50/0x54)
[    6.662628] [&lt;c05c6994&gt;] (rpm_callback) from [&lt;c05c66b0&gt;] (rpm_resume+0x448/0x4e4)
[    6.670593] [&lt;c05c66b0&gt;] (rpm_resume) from [&lt;c05c6784&gt;] (__pm_runtime_resume+0x38/0x50)
[    6.678985] [&lt;c05c6784&gt;] (__pm_runtime_resume) from [&lt;bf14ab20&gt;] (musb_init_controller+0x350/0xa5c [musb_hdrc])
[    6.689727] [&lt;bf14ab20&gt;] (musb_init_controller [musb_hdrc]) from [&lt;c05bccb8&gt;] (platform_probe+0x58/0xa8)
[    6.699737] [&lt;c05bccb8&gt;] (platform_probe) from [&lt;c05badf0&gt;] (really_probe+0x170/0x2fc)
[    6.708068] [&lt;c05badf0&gt;] (really_probe) from [&lt;c05bb040&gt;] (__driver_probe_device+0xc4/0xd8)
[    6.716827] [&lt;c05bb040&gt;] (__driver_probe_device) from [&lt;c05bb084&gt;] (driver_probe_device+0x30/0xac)
[    6.726226] [&lt;c05bb084&gt;] (driver_probe_device) from [&lt;c05bb3d0&gt;] (__device_attach_driver+0x94/0xb4)
[    6.735717] [&lt;c05bb3d0&gt;] (__device_attach_driver) from [&lt;c05b93f8&gt;] (bus_for_each_drv+0xa0/0xb4)
[    6.744934] [&lt;c05b93f8&gt;] (bus_for_each_drv) from [&lt;c05bb248&gt;] (__device_attach+0xc0/0x134)
[    6.753631] [&lt;c05bb248&gt;] (__device_attach) from [&lt;c05b9fcc&gt;] (bus_probe_device+0x28/0x80)
[    6.762207] [&lt;c05b9fcc&gt;] (bus_probe_device) from [&lt;c05b7e40&gt;] (device_add+0x5fc/0x788)
[    6.770507] [&lt;c05b7e40&gt;] (device_add) from [&lt;c05bd240&gt;] (platform_device_add+0x70/0x1bc)
[    6.779022] [&lt;c05bd240&gt;] (platform_device_add) from [&lt;bf177830&gt;] (omap2430_probe+0x260/0x2d4 [omap2430])
[    6.789001] [&lt;bf177830&gt;] (omap2430_probe [omap2430]) from [&lt;c05bccb8&gt;] (platform_probe+0x58/0xa8)
[    6.798309] [&lt;c05bccb8&gt;] (platform_probe) from [&lt;c05badf0&gt;] (really_probe+0x170/0x2fc)
[    6.806610] [&lt;c05badf0&gt;] (really_probe) from [&lt;c05bb040&gt;] (__driver_probe_device+0xc4/0xd8)
[    6.815399] [&lt;c05bb040&gt;] (__driver_probe_device) from [&lt;c05bb084&gt;] (driver_probe_device+0x30/0xac)
[    6.824798] [&lt;c05bb084&gt;] (driver_probe_device) from [&lt;c05bb4b4&gt;] (__driver_attach+0xc4/0xd8)
[    6.833648] [&lt;c05bb4b4&gt;] (__driver_attach) from [&lt;c05b9308&gt;] (bus_for_each_dev+0x64/0xa0)
[    6.842224] [&lt;c05b9308&gt;] (bus_for_each_dev) from [&lt;c05ba248&gt;] (bus_add_driver+0x148/0x1a4)
[    6.850891] [&lt;c05ba248&gt;] (bus_add_driver) from [&lt;c05bbd1c&gt;] (driver_register+0xb4/0xf8)
[    6.859313] [&lt;c05bbd1c&gt;] (driver_register) from [&lt;c0101f54&gt;] (do_one_initcall+0x90/0x1c8)
[    6.867889] [&lt;c0101f54&gt;] (do_one_initcall) from [&lt;c0893968&gt;] (do_init_module+0x4c/0x204)
[    6.876373] [&lt;c0893968&gt;] (do_init_module) from [&lt;c01b4c30&gt;] (load_module+0x13f0/0x1928)
[    6.884796] [&lt;c01b4c30&gt;] (load_module) from [&lt;c01b53a0&gt;] (sys_finit_module+0xa0/0xc0)
[    6.893005] [&lt;c01b53a0&gt;] (sys_finit_module) from [&lt;c0100080&gt;] (ret_fast_syscall+0x0/0x54)
[    6.901580] Exception stack(0xc2807fa8 to 0xc2807ff0)
[    6.906890] 7fa0:                   b6e517d4 00052068 00000006 b6e509f8 00000000 b6e5131c
[    6.915466] 7fc0: b6e517d4 00052068 cd718000 0000017b 00020000 00037f78 00050048 00063368
[    6.924011] 7fe0: bed8fef0 bed8fee0 b6e4ac4b b6f55a42
[    6.929321] ---[ end trace d715ff121b58763c ]---

c) git bisect result on testing for "musb-hdrc" in the console log:

cf081d009c447647c6b36aced535ca427dbebe72 is the first bad commit
commit cf081d009c447647c6b36aced535ca427dbebe72
Author: Rob Herring &lt;robh@kernel.org&gt;
Date:   Wed Dec 15 17:07:57 2021 -0600

  usb: musb: Set the DT node on the child device

  The musb glue drivers just copy the glue resources to the musb child device.
  Instead, set the musb child device's DT node pointer to the parent device's
  node so that platform_get_irq_byname() can find the resources in the DT.
  This removes the need for statically populating the IRQ resources from the
  DT which has been deprecated for some time.

  Signed-off-by: Rob Herring &lt;robh@kernel.org&gt;
  Link: https://lore.kernel.org/r/20211215230756.2009115-3-robh@kernel.org
  Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

drivers/usb/musb/am35x.c    | 2 ++
drivers/usb/musb/da8xx.c    | 2 ++
drivers/usb/musb/jz4740.c   | 1 +
drivers/usb/musb/mediatek.c | 2 ++
drivers/usb/musb/omap2430.c | 1 +
drivers/usb/musb/ux500.c    | 1 +
6 files changed, 9 insertions(+)

Reverting this patch makes musb work again as before.

Fixes: cf081d009c44 ("usb: musb: Set the DT node on the child device")
Cc: Rob Herring &lt;robh@kernel.org&gt;
Signed-off-by: H. Nikolaus Schaller &lt;hns@goldelico.com&gt;
Link: https://lore.kernel.org/r/f62f5fc11f9ecae7e57f3fd66939e051bd3b11fc.1646744166.git.hns@goldelico.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: gadget: rndis: prevent integer overflow in rndis_set_response()</title>
<updated>2022-03-15T14:48:57Z</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2022-03-01T08:04:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=65f3324f4b6fed78b8761c3b74615ecf0ffa81fa'/>
<id>urn:sha1:65f3324f4b6fed78b8761c3b74615ecf0ffa81fa</id>
<content type='text'>
If "BufOffset" is very large the "BufOffset + 8" operation can have an
integer overflow.

Cc: stable@kernel.org
Fixes: 38ea1eac7d88 ("usb: gadget: rndis: check size of RNDIS_MSG_SET command")
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Link: https://lore.kernel.org/r/20220301080424.GA17208@kili
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>xen/usb: don't use gnttab_end_foreign_access() in xenhcd_gnttab_done()</title>
<updated>2022-03-07T08:48:55Z</updated>
<author>
<name>Juergen Gross</name>
<email>jgross@suse.com</email>
</author>
<published>2022-03-07T08:48:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=cd7bcfab4e73dcb3de92c2014c19f17af3864bfe'/>
<id>urn:sha1:cd7bcfab4e73dcb3de92c2014c19f17af3864bfe</id>
<content type='text'>
The usage of gnttab_end_foreign_access() in xenhcd_gnttab_done() is
not safe against a malicious backend, as the backend could keep the
I/O page mapped and modify it even after the granted memory page is
being used for completely other purposes in the local system.

So replace that use case with gnttab_try_end_foreign_access() and
disable the PV host adapter in case the backend didn't stop using the
granted page.

In xenhcd_urb_request_done() immediately return in case of setting
the device state to "error" instead of looking into further backend
responses.

Reported-by: Demi Marie Obenour &lt;demi@invisiblethingslab.com&gt;
Signed-off-by: Juergen Gross &lt;jgross@suse.com&gt;
Reviewed-by: Jan Beulich &lt;jbeulich@suse.com&gt;
---
V2:
- use gnttab_try_end_foreign_access()
</content>
</entry>
<entry>
<title>Merge tag 'usb-serial-5.17-rc6' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-linus</title>
<updated>2022-02-24T13:51:45Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2022-02-24T13:51:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=19eae24b76c27dedfb166dc06a8c48e052cbc814'/>
<id>urn:sha1:19eae24b76c27dedfb166dc06a8c48e052cbc814</id>
<content type='text'>
Johan writes:

USB-serial fixes for 5.17-rc6

Here's a revert of a commit which erroneously added a device id used for
the EPP/MEM mode of ch341 devices.

Included are also some new modem device ids.

All have been in linux-next with no reported issues.

* tag 'usb-serial-5.17-rc6' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial:
  USB: serial: option: add Telit LE910R1 compositions
  USB: serial: option: add support for DW5829e
  Revert "USB: serial: ch341: add new Product ID for CH341A"
</content>
</entry>
<entry>
<title>usb: gadget: rndis: add spinlock for rndis response list</title>
<updated>2022-02-24T10:16:57Z</updated>
<author>
<name>Daehwan Jung</name>
<email>dh10.jung@samsung.com</email>
</author>
<published>2022-02-22T05:29:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=aaaba1c86d04dac8e49bf508b492f81506257da3'/>
<id>urn:sha1:aaaba1c86d04dac8e49bf508b492f81506257da3</id>
<content type='text'>
There's no lock for rndis response list. It could cause list corruption
if there're two different list_add at the same time like below.
It's better to add in rndis_add_response / rndis_free_response
/ rndis_get_next_response to prevent any race condition on response list.

[  361.894299] [1:   irq/191-dwc3:16979] list_add corruption.
next-&gt;prev should be prev (ffffff80651764d0),
but was ffffff883dc36f80. (next=ffffff80651764d0).

[  361.904380] [1:   irq/191-dwc3:16979] Call trace:
[  361.904391] [1:   irq/191-dwc3:16979]  __list_add_valid+0x74/0x90
[  361.904401] [1:   irq/191-dwc3:16979]  rndis_msg_parser+0x168/0x8c0
[  361.904409] [1:   irq/191-dwc3:16979]  rndis_command_complete+0x24/0x84
[  361.904417] [1:   irq/191-dwc3:16979]  usb_gadget_giveback_request+0x20/0xe4
[  361.904426] [1:   irq/191-dwc3:16979]  dwc3_gadget_giveback+0x44/0x60
[  361.904434] [1:   irq/191-dwc3:16979]  dwc3_ep0_complete_data+0x1e8/0x3a0
[  361.904442] [1:   irq/191-dwc3:16979]  dwc3_ep0_interrupt+0x29c/0x3dc
[  361.904450] [1:   irq/191-dwc3:16979]  dwc3_process_event_entry+0x78/0x6cc
[  361.904457] [1:   irq/191-dwc3:16979]  dwc3_process_event_buf+0xa0/0x1ec
[  361.904465] [1:   irq/191-dwc3:16979]  dwc3_thread_interrupt+0x34/0x5c

Fixes: f6281af9d62e ("usb: gadget: rndis: use list_for_each_entry_safe")
Cc: stable &lt;stable@kernel.org&gt;
Signed-off-by: Daehwan Jung &lt;dh10.jung@samsung.com&gt;
Link: https://lore.kernel.org/r/1645507768-77687-1-git-send-email-dh10.jung@samsung.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: dwc3: gadget: Let the interrupt handler disable bottom halves.</title>
<updated>2022-02-24T10:16:38Z</updated>
<author>
<name>Sebastian Andrzej Siewior</name>
<email>bigeasy@linutronix.de</email>
</author>
<published>2022-02-18T17:32:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=84918a89d6efaff075de570b55642b6f4ceeac6d'/>
<id>urn:sha1:84918a89d6efaff075de570b55642b6f4ceeac6d</id>
<content type='text'>
The interrupt service routine registered for the gadget is a primary
handler which mask the interrupt source and a threaded handler which
handles the source of the interrupt. Since the threaded handler is
voluntary threaded, the IRQ-core does not disable bottom halves before
invoke the handler like it does for the forced-threaded handler.

Due to changes in networking it became visible that a network gadget's
completions handler may schedule a softirq which remains unprocessed.
The gadget's completion handler is usually invoked either in hard-IRQ or
soft-IRQ context. In this context it is enough to just raise the softirq
because the softirq itself will be handled once that context is left.
In the case of the voluntary threaded handler, there is nothing that
will process pending softirqs. Which means it remain queued until
another random interrupt (on this CPU) fires and handles it on its exit
path or another thread locks and unlocks a lock with the bh suffix.
Worst case is that the CPU goes idle and the NOHZ complains about
unhandled softirqs.

Disable bottom halves before acquiring the lock (and disabling
interrupts) and enable them after dropping the lock. This ensures that
any pending softirqs will handled right away.

Link: https://lkml.kernel.org/r/c2a64979-73d1-2c22-e048-c275c9f81558@samsung.com
Fixes: e5f68b4a3e7b0 ("Revert "usb: dwc3: gadget: remove unnecessary _irqsave()"")
Cc: stable &lt;stable@kernel.org&gt;
Reported-by: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
Tested-by: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
Signed-off-by: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Link: https://lore.kernel.org/r/Yg/YPejVQH3KkRVd@linutronix.de
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>USB: gadget: validate endpoint index for xilinx udc</title>
<updated>2022-02-24T10:00:07Z</updated>
<author>
<name>Szymon Heidrich</name>
<email>szymon.heidrich@gmail.com</email>
</author>
<published>2022-02-21T12:24:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7f14c7227f342d9932f9b918893c8814f86d2a0d'/>
<id>urn:sha1:7f14c7227f342d9932f9b918893c8814f86d2a0d</id>
<content type='text'>
Assure that host may not manipulate the index to point
past endpoint array.

Signed-off-by: Szymon Heidrich &lt;szymon.heidrich@gmail.com&gt;
Cc: stable &lt;stable@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
