From: Shuangpeng <shuangpeng.kernel@gmail.com>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: viro@zeniv.linux.org.uk, r.baldyga@samsung.com, balbi@ti.com,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [PATCH] usb: gadget: f_fs: fix use-after-free in ffs_func_unbind
Date: Fri, 20 Nov 2026 15:34:39 -0500 [thread overview]
Message-ID: <C24E320A-EF6F-413E-A618-FB7FAF023F79@gmail.com> (raw)
In-Reply-To: <2026112053-skating-swimsuit-9c33@gregkh>
> On Nov 20, 2026, at 05:21, Greg KH <gregkh@linuxfoundation.org> wrote:
>
> On Fri, Aug 14, 2026 at 09:38:18PM -0400, Shuangpeng Bai wrote:
>
> Are you sure this is ok? This means you now have a double reference.
The get is paired with a put at the end of the function, but taking and
dropping an extra reference isn't the cleanest way to fix this. The real
problem is the ordering: ffs_func_unbind() keeps using ffs after
functionfs_unbind() drops the reference. I'll send a v2 that moves
functionfs_unbind() to the end of ffs_func_unbind() instead, so no extra
reference is needed.
Best,
Shuangpeng
>
> thanks,
>
> greg k-h
prev parent reply other threads:[~2026-11-20 20:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-15 1:38 Shuangpeng Bai
2026-11-20 10:21 ` Greg KH
2026-11-20 20:34 ` Shuangpeng [this message]
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=C24E320A-EF6F-413E-A618-FB7FAF023F79@gmail.com \
--to=shuangpeng.kernel@gmail.com \
--cc=balbi@ti.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=r.baldyga@samsung.com \
--cc=stable@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®