* [PATCH stable 5.10] usb: dwc3: Remove DWC3 locking during gadget suspend/resume [not found] <CGME20250820141146epcas5p1a87653e56e5a9e6ce844330a94e76eea@epcas5p1.samsung.com> @ 2025-08-20 14:11 ` Selvarasu Ganesan 2025-08-20 14:26 ` Greg KH 0 siblings, 1 reply; 3+ messages in thread From: Selvarasu Ganesan @ 2025-08-20 14:11 UTC (permalink / raw) To: stable; +Cc: akash.m5@samsung.com, thiagu.r@samsung.com Dear stable team, Patch : usb: dwc3: Remove DWC3 locking during gadget suspend/resume Commit id:5265397f94424eaea596026fd34dc7acf474dcec This patch fixes a critical bug in the dwc3 driver that was introduced by commit (https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/drivers/usb/dwc3/gadget.c?h=v5.10.240&id=90e2820c6c30db2427d020d344dfca7de813bd24 <https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/drivers/usb/dwc3/gadget.c?h=v5.10.240&id=90e2820c6c30db2427d020d344dfca7de813bd24>) in the 5.10 kernel series. The bug causes the below kernel crash (Added usleep in atomic context as part of above patch) under dwc3 suspend/resume scenarios. 35.829644] [6: kworker/6:1: 68] BUG: scheduling while atomic: kworker/6:1/68/0x00000002 [ 35.829946] [6: kworker/6:1: 68] CPU: 6 PID: 68 Comm: kworker/6:1 Tainted: G C E 5.10.236-android13-4 #1 [ 35.830010] [6: kworker/6:1: 68] Call trace: [ 35.830024] [6: kworker/6:1: 68] dump_backtrace.cfi_jt+0x0/0x8 [ 35.830034] [6: kworker/6:1: 68] show_stack+0x1c/0x2c [ 35.830044] [6: kworker/6:1: 68] dump_stack_lvl+0xd8/0x134 [ 35.830053] [6: kworker/6:1: 68] __schedule_bug+0x80/0xbc [ 35.830062] [6: kworker/6:1: 68] __schedule+0x55c/0x7e8 [ 35.830068] [6: kworker/6:1: 68] schedule+0x80/0x100 [ 35.830077] [6: kworker/6:1: 68] schedule_hrtimeout_range_clock+0xa8/0x11c [ 35.830083] [6: kworker/6:1: 68] usleep_range+0x68/0xa4 [ 35.830093] [6: kworker/6:1: 68] dwc3_gadget_run_stop+0x170/0x448 [ 35.830099] [6: kworker/6:1: 68] dwc3_gadget_resume+0x4c/0xdc [ 35.830108] [6: kworker/6:1: 68] dwc3_resume_common+0x6c/0x23c [ 35.830115] [6: kworker/6:1: 68] dwc3_runtime_resume+0x40/0xcc [ 35.830123] [6: kworker/6:1: 68] pm_generic_runtime_resume+0x48/0x88 [ 35.830131] [6: kworker/6:1: 68] __rpm_callback+0x94/0x420 The patch(5265397f9442) for this fix was originally merged in the below commit: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/drivers/usb/dwc3?h=next-20250820&id=5265397f94424eaea596026fd34dc7acf474dcec <https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/drivers/usb/dwc3?h=next-20250820&id=5265397f94424eaea596026fd34dc7acf474dcec> Please apply this patch to the stable 5.10 kernel to prevent this BUG. Additionally the below patch also required to avoid dead lock that introduced by the abovepatch (5265397f9442) in 5.10 stable kernel. Patch:usb: dwc3: core: remove lock of otg mode during gadget suspend/resume to avoid deadlock Commit id:7838de15bb700c2898a7d741db9b1f3cbc86c136 https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/drivers/usb/dwc3?h=next-20250820&id=7838de15bb700c2898a7d741db9b1f3cbc86c136 <https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/drivers/usb/dwc3?h=next-20250820&id=7838de15bb700c2898a7d741db9b1f3cbc86c136> Thanks, Selva ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH stable 5.10] usb: dwc3: Remove DWC3 locking during gadget suspend/resume 2025-08-20 14:11 ` [PATCH stable 5.10] usb: dwc3: Remove DWC3 locking during gadget suspend/resume Selvarasu Ganesan @ 2025-08-20 14:26 ` Greg KH 2025-08-21 4:42 ` Selvarasu Ganesan 0 siblings, 1 reply; 3+ messages in thread From: Greg KH @ 2025-08-20 14:26 UTC (permalink / raw) To: Selvarasu Ganesan; +Cc: stable, akash.m5@samsung.com, thiagu.r@samsung.com On Wed, Aug 20, 2025 at 07:41:44PM +0530, Selvarasu Ganesan wrote: > Dear stable team, > > > Patch : usb: dwc3: Remove DWC3 locking during gadget suspend/resume > > Commit id:5265397f94424eaea596026fd34dc7acf474dcec > > This patch fixes a critical bug in the dwc3 driver that was introduced > by commit > (https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/drivers/usb/dwc3/gadget.c?h=v5.10.240&id=90e2820c6c30db2427d020d344dfca7de813bd24 > <https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/drivers/usb/dwc3/gadget.c?h=v5.10.240&id=90e2820c6c30db2427d020d344dfca7de813bd24>) > in the 5.10 kernel series. But that is not what the dwc3 patch says it does, how do we know it is ok to backport this? > The bug causes the below kernel crash (Added usleep in atomic context as > part of above patch) under dwc3 suspend/resume scenarios. > > 35.829644] [6: kworker/6:1: 68] BUG: scheduling while atomic: > kworker/6:1/68/0x00000002 > > [ 35.829946] [6: kworker/6:1: 68] CPU: 6 PID: 68 Comm: kworker/6:1 > Tainted: G C E 5.10.236-android13-4 #1 > > [ 35.830010] [6: kworker/6:1: 68] Call trace: > > [ 35.830024] [6: kworker/6:1: 68] dump_backtrace.cfi_jt+0x0/0x8 > > [ 35.830034] [6: kworker/6:1: 68] show_stack+0x1c/0x2c > > [ 35.830044] [6: kworker/6:1: 68] dump_stack_lvl+0xd8/0x134 > > [ 35.830053] [6: kworker/6:1: 68] __schedule_bug+0x80/0xbc > > [ 35.830062] [6: kworker/6:1: 68] __schedule+0x55c/0x7e8 > > [ 35.830068] [6: kworker/6:1: 68] schedule+0x80/0x100 > > [ 35.830077] [6: kworker/6:1: 68] schedule_hrtimeout_range_clock+0xa8/0x11c > > [ 35.830083] [6: kworker/6:1: 68] usleep_range+0x68/0xa4 > > [ 35.830093] [6: kworker/6:1: 68] dwc3_gadget_run_stop+0x170/0x448 > > [ 35.830099] [6: kworker/6:1: 68] dwc3_gadget_resume+0x4c/0xdc > > [ 35.830108] [6: kworker/6:1: 68] dwc3_resume_common+0x6c/0x23c > > [ 35.830115] [6: kworker/6:1: 68] dwc3_runtime_resume+0x40/0xcc > > [ 35.830123] [6: kworker/6:1: 68] pm_generic_runtime_resume+0x48/0x88 > > [ 35.830131] [6: kworker/6:1: 68] __rpm_callback+0x94/0x420 > > The patch(5265397f9442) for this fix was originally merged in the below > commit: > > https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/drivers/usb/dwc3?h=next-20250820&id=5265397f94424eaea596026fd34dc7acf474dcec > <https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/drivers/usb/dwc3?h=next-20250820&id=5265397f94424eaea596026fd34dc7acf474dcec> > > Please apply this patch to the stable 5.10 kernel to prevent this BUG. > > Additionally the below patch also required to avoid dead lock that > introduced by the abovepatch (5265397f9442) in 5.10 stable kernel. > > Patch:usb: dwc3: core: remove lock of otg mode during gadget > suspend/resume to avoid deadlock > > Commit id:7838de15bb700c2898a7d741db9b1f3cbc86c136 Can you please submit a backported, and tested, series of patches here so that we know that we got the correct ones, and we have your signed-off-by on them to show you tested them? thanks, greg k-h ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH stable 5.10] usb: dwc3: Remove DWC3 locking during gadget suspend/resume 2025-08-20 14:26 ` Greg KH @ 2025-08-21 4:42 ` Selvarasu Ganesan 0 siblings, 0 replies; 3+ messages in thread From: Selvarasu Ganesan @ 2025-08-21 4:42 UTC (permalink / raw) To: Greg KH Cc: stable, akash.m5@samsung.com, thiagu.r@samsung.com, alim.akhtar@samsung.com, Wesley Cheng On 8/20/2025 7:56 PM, Greg KH wrote: > On Wed, Aug 20, 2025 at 07:41:44PM +0530, Selvarasu Ganesan wrote: >> Dear stable team, >> >> >> Patch : usb: dwc3: Remove DWC3 locking during gadget suspend/resume >> >> Commit id:5265397f94424eaea596026fd34dc7acf474dcec >> >> This patch fixes a critical bug in the dwc3 driver that was introduced >> by commit >> (https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/drivers/usb/dwc3/gadget.c?h=v5.10.240&id=90e2820c6c30db2427d020d344dfca7de813bd24 >> <https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/drivers/usb/dwc3/gadget.c?h=v5.10.240&id=90e2820c6c30db2427d020d344dfca7de813bd24>) >> in the 5.10 kernel series. > But that is not what the dwc3 patch says it does, how do we know it is > ok to backport this? Hi Greg, We agree that the dwc3 patch (5265397f9442 : usb: dwc3: Remove DWC3 locking during gadget suspend/resume ) was missing Fixes/stable tags, which led to confusion about its backport. However, these tags should have been included by the author, as the patch fixed a critical bug. Furthermore, a this USB BUG observed easily in the USB reconnect case where the device enters suspend/resume mode with current 5.10 stable kernel. > >> The bug causes the below kernel crash (Added usleep in atomic context as >> part of above patch) under dwc3 suspend/resume scenarios. >> >> 35.829644] [6: kworker/6:1: 68] BUG: scheduling while atomic: >> kworker/6:1/68/0x00000002 >> >> [ 35.829946] [6: kworker/6:1: 68] CPU: 6 PID: 68 Comm: kworker/6:1 >> Tainted: G C E 5.10.236-android13-4 #1 >> >> [ 35.830010] [6: kworker/6:1: 68] Call trace: >> >> [ 35.830024] [6: kworker/6:1: 68] dump_backtrace.cfi_jt+0x0/0x8 >> >> [ 35.830034] [6: kworker/6:1: 68] show_stack+0x1c/0x2c >> >> [ 35.830044] [6: kworker/6:1: 68] dump_stack_lvl+0xd8/0x134 >> >> [ 35.830053] [6: kworker/6:1: 68] __schedule_bug+0x80/0xbc >> >> [ 35.830062] [6: kworker/6:1: 68] __schedule+0x55c/0x7e8 >> >> [ 35.830068] [6: kworker/6:1: 68] schedule+0x80/0x100 >> >> [ 35.830077] [6: kworker/6:1: 68] schedule_hrtimeout_range_clock+0xa8/0x11c >> >> [ 35.830083] [6: kworker/6:1: 68] usleep_range+0x68/0xa4 >> >> [ 35.830093] [6: kworker/6:1: 68] dwc3_gadget_run_stop+0x170/0x448 >> >> [ 35.830099] [6: kworker/6:1: 68] dwc3_gadget_resume+0x4c/0xdc >> >> [ 35.830108] [6: kworker/6:1: 68] dwc3_resume_common+0x6c/0x23c >> >> [ 35.830115] [6: kworker/6:1: 68] dwc3_runtime_resume+0x40/0xcc >> >> [ 35.830123] [6: kworker/6:1: 68] pm_generic_runtime_resume+0x48/0x88 >> >> [ 35.830131] [6: kworker/6:1: 68] __rpm_callback+0x94/0x420 >> >> The patch(5265397f9442) for this fix was originally merged in the below >> commit: >> >> https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/drivers/usb/dwc3?h=next-20250820&id=5265397f94424eaea596026fd34dc7acf474dcec >> <https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/drivers/usb/dwc3?h=next-20250820&id=5265397f94424eaea596026fd34dc7acf474dcec> >> >> Please apply this patch to the stable 5.10 kernel to prevent this BUG. >> >> Additionally the below patch also required to avoid dead lock that >> introduced by the abovepatch (5265397f9442) in 5.10 stable kernel. >> >> Patch:usb: dwc3: core: remove lock of otg mode during gadget >> suspend/resume to avoid deadlock >> >> Commit id:7838de15bb700c2898a7d741db9b1f3cbc86c136 > Can you please submit a backported, and tested, series of patches here > so that we know that we got the correct ones, and we have your > signed-off-by on them to show you tested them? Sure, We will post patches that include backported based on the 5.10 stable kernel. Thanks, Selva > > thanks, > > greg k-h > ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-08-21 4:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <CGME20250820141146epcas5p1a87653e56e5a9e6ce844330a94e76eea@epcas5p1.samsung.com>
2025-08-20 14:11 ` [PATCH stable 5.10] usb: dwc3: Remove DWC3 locking during gadget suspend/resume Selvarasu Ganesan
2025-08-20 14:26 ` Greg KH
2025-08-21 4:42 ` Selvarasu Ganesan
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.