From: Tom Rini <trini@konsulko.com>
To: Yuho Choi <oss.patchbox@gmail.com>
Cc: Marek Vasut <marek.vasut+usb@mailbox.org>,
Stephan Gerhold <stephan@gerhold.net>,
Linus Walleij <linusw@kernel.org>,
Greg Malysa <malysagreg@gmail.com>,
Vasileios Bimpikas <vasileios.bimpikas@analog.com>,
Arturs Artamonovs <arturs.artamonovs@analog.com>,
linux@analog.com, u-boot@lists.u-boot-project.org
Subject: Re: [PATCH 0/6] usb: musb-new: Free the controller if the host probe fails
Date: Fri, 6 Nov 2026 14:56:08 -0600 [thread overview]
Message-ID: <20261106205608.GF3741582@bill-the-cat> (raw)
In-Reply-To: <20261106194621.510146-1-oss.patchbox@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1257 bytes --]
On Fri, Nov 06, 2026 at 02:45:52PM -0500, Yuho Choi wrote:
> The MUSB glue drivers below allocate the struct musb with
> musb_init_controller() in their host probe and return the error when
> musb_lowlevel_init() fails, for example when no device is connected.
> None of them frees the struct musb on that path, and the driver core
> then frees the private data that holds the only pointer to it, so each
> 'usb reset', or 'usb start' after 'usb stop', leaks another one. This
> series frees it in ux500, sc5xx, pic32, omap2430, ti-musb and da8xx.
>
> The same fix for sunxi and mt85xx was sent as separate patches:
> "usb: musb-new: sunxi: Free the controller if the host probe fails"
> "usb: musb-new: mt85xx: Free the controller if the host probe fails"
>
> The patches are independent of each other. They are build-tested only,
> as noted in each patch, and pic32 is not built at all. None was tested
> on hardware.
How are you finding and investigating these issues, exactly? To cut to
the chase, this series (and the other two patches) sure seem like what
happens when someone sends an LLM to look for resource leaks. Which are
not great. But the bigger concern is if we handle the error case
correctly. Thanks.
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2026-11-06 20:56 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-06 19:45 [PATCH 0/6] usb: musb-new: Free the controller if the host probe fails Yuho Choi
2026-11-06 19:45 ` [PATCH 1/6] usb: musb-new: ux500: " Yuho Choi
2026-11-06 21:44 ` Linus Walleij
2026-11-06 19:45 ` [PATCH 2/6] usb: musb-new: sc5xx: " Yuho Choi
2026-11-07 23:18 ` Greg Malysa
2026-11-07 23:46 ` Greg Malysa
2026-11-08 3:20 ` Yuho Choi
2026-11-08 5:39 ` Greg Malysa
2026-11-06 19:45 ` [PATCH 3/6] usb: musb-new: pic32: " Yuho Choi
2026-11-06 19:45 ` [PATCH 4/6] usb: musb-new: omap2430: " Yuho Choi
2026-11-06 19:45 ` [PATCH 5/6] usb: musb-new: ti-musb: " Yuho Choi
2026-11-06 19:45 ` [PATCH 6/6] usb: musb-new: da8xx: " Yuho Choi
2026-11-06 20:56 ` Tom Rini [this message]
2026-11-06 23:19 ` [PATCH 0/6] usb: musb-new: " Yuho Choi
2026-11-09 17:29 ` Tom Rini
2026-11-09 20:41 ` Yuho Choi
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=20261106205608.GF3741582@bill-the-cat \
--to=trini@konsulko.com \
--cc=arturs.artamonovs@analog.com \
--cc=linusw@kernel.org \
--cc=linux@analog.com \
--cc=malysagreg@gmail.com \
--cc=marek.vasut+usb@mailbox.org \
--cc=oss.patchbox@gmail.com \
--cc=stephan@gerhold.net \
--cc=u-boot@lists.u-boot-project.org \
--cc=vasileios.bimpikas@analog.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.