From: Greg KH <gregkh@linuxfoundation.org>
To: Guangshuo Li <lgs201920130244@gmail.com>
Cc: Jens Axboe <axboe@kernel.dk>, Jiri Slaby <jirislaby@kernel.org>,
Denis Efremov <efremov@linux.com>,
Greg Kroah-Hartman <gregkh@suse.de>,
linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [PATCH v2] floppy: fix reference leak on platform_device_register() failure
Date: Fri, 24 Apr 2026 06:15:35 +0200 [thread overview]
Message-ID: <2026042411-repressed-manliness-4ee9@gregkh> (raw)
In-Reply-To: <CANUHTR8W7tz0me90GDci97ee6N+3MpB7uVYYFN0dtTf9u_Ui2g@mail.gmail.com>
On Fri, Apr 24, 2026 at 11:14:17AM +0800, Guangshuo Li wrote:
> Hi Jiri, Jens,
>
> Thanks for the review and for catching this.
>
> On Thu, 23 Apr 2026 at 19:06, Jens Axboe <axboe@kernel.dk> wrote:
> >
> > > The patch is likely wrong. Given the pdev is static, the struct device
> > > has no ->release, so releasing it will trigger a warning. AFAIR, the
> > > consensus was to fix platform_device_register() proper.
> >
> > Thanks for letting me know, I'll revert this change for now.
> >
>
> You are right that this fix is not appropriate for this case. Since the
> platform device is static and the embedded struct device has no release
> callback, calling platform_device_put() / releasing it here is wrong and
> can trigger warnings.
>
> Please disregard this patch. I will drop it and not pursue it further in
> its current form.
Can you go back and verify that all of the other patches you sent out
for this same pattern are also either ignored, or reverted?
thanks,
greg k-h
next prev parent reply other threads:[~2026-04-24 4:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-15 14:57 [PATCH v2] floppy: fix reference leak on platform_device_register() failure Guangshuo Li
2026-04-17 20:39 ` Jens Axboe
2026-04-23 5:11 ` Jiri Slaby
2026-04-23 11:06 ` Jens Axboe
2026-04-24 3:14 ` Guangshuo Li
2026-04-24 4:15 ` Greg KH [this message]
2026-04-24 7:40 ` Guangshuo Li
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=2026042411-repressed-manliness-4ee9@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=axboe@kernel.dk \
--cc=efremov@linux.com \
--cc=gregkh@suse.de \
--cc=jirislaby@kernel.org \
--cc=lgs201920130244@gmail.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.org \
/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.