From: Greg KH <gregkh@linuxfoundation.org>
To: Selvarasu Ganesan <selvarasu.g@samsung.com>
Cc: stable@vger.kernel.org,
"akash.m5@samsung.com" <akash.m5@samsung.com>,
"thiagu.r@samsung.com" <thiagu.r@samsung.com>
Subject: Re: [PATCH stable 5.10] usb: dwc3: Remove DWC3 locking during gadget suspend/resume
Date: Wed, 20 Aug 2025 16:26:16 +0200 [thread overview]
Message-ID: <2025082051-circle-state-e38e@gregkh> (raw)
In-Reply-To: <8c68604b-2775-4d70-a0d6-18ecb979c797@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
next prev parent reply other threads:[~2025-08-20 14:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[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 [this message]
2025-08-21 4:42 ` Selvarasu Ganesan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2025082051-circle-state-e38e@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=akash.m5@samsung.com \
--cc=selvarasu.g@samsung.com \
--cc=stable@vger.kernel.org \
--cc=thiagu.r@samsung.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.