* [Bug 219977] New: usb: dwc2: memory leak of hsotg->regset
@ 2025-04-03 8:49 bugzilla-daemon
2026-08-10 7:10 ` [Bug 219977] " bugzilla-daemon
0 siblings, 1 reply; 2+ messages in thread
From: bugzilla-daemon @ 2025-04-03 8:49 UTC (permalink / raw)
To: linux-usb
https://bugzilla.kernel.org/show_bug.cgi?id=219977
Bug ID: 219977
Summary: usb: dwc2: memory leak of hsotg->regset
Product: Drivers
Version: 2.5
Hardware: All
OS: Linux
Status: NEW
Severity: normal
Priority: P3
Component: USB
Assignee: drivers_usb@kernel-bugs.kernel.org
Reporter: kakapapa2@gmail.com
Regression: No
Hi,
In drivers/usb/dwc2/debugfs.c line 790:
https://web.git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/drivers/usb/dwc2/debugfs.c?h=v6.13.9
790:
hsotg->regset = devm_kzalloc(hsotg->dev, sizeof(*hsotg->regset),
GFP_KERNEL);
"hsotg->regset" is allocated but not be released in dwc2_debugfs_exit().
FYI.
dwc3 was fixed same issue in commit e6bdf8195b4a43ebff71f25fc7ca5e436e79161a.
--
You may reply to this email to add a comment.
You are receiving this mail because:
You are watching the assignee of the bug.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug 219977] usb: dwc2: memory leak of hsotg->regset
2025-04-03 8:49 [Bug 219977] New: usb: dwc2: memory leak of hsotg->regset bugzilla-daemon
@ 2026-08-10 7:10 ` bugzilla-daemon
0 siblings, 0 replies; 2+ messages in thread
From: bugzilla-daemon @ 2026-08-10 7:10 UTC (permalink / raw)
To: linux-usb
https://bugzilla.kernel.org/show_bug.cgi?id=219977
Wei Huang (huangwei@kylinos.cn) changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |huangwei@kylinos.cn
--- Comment #1 from Wei Huang (huangwei@kylinos.cn) ---
Hi kakapapa2,
Thanks for reporting this. A fix has been submitted to the linux-usb mailing
list:
https://lore.kernel.org/linux-usb/?q=huangwei%40kylinos.cn
The fix mirrors the equivalent dwc3 fix (commit e6bdf8195b4a) by
switching hsotg->regset from devm_kzalloc() to kzalloc() and freeing
it explicitly in dwc2_debugfs_exit().
https://lore.kernel.org/linux-usb/20260807100400.3179625-1-huangwei@kylinos.cn/
--
You may reply to this email to add a comment.
You are receiving this mail because:
You are watching the assignee of the bug.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-08-10 7:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-03 8:49 [Bug 219977] New: usb: dwc2: memory leak of hsotg->regset bugzilla-daemon
2026-08-10 7:10 ` [Bug 219977] " bugzilla-daemon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox