From: Neill Kapron <nkapron@google.com>
To: Ingo Rohloff <ingo.rohloff@lauterbach.com>
Cc: gregkh@linuxfoundation.org, viro@zeniv.linux.org.uk,
me@samcday.com, michael.bommarito@gmail.com,
linux-usb@vger.kernel.org, xiehongyu1@kylinos.cn
Subject: Re: [PATCH 3/3] usb: gadget: f_fs: Fix mmgrab()/mmdrop() balance.
Date: Fri, 6 Nov 2026 22:53:28 +0000 [thread overview]
Message-ID: <au5aaGJzgMwEw-3j@google.com> (raw)
In-Reply-To: <20260901120908.14386-4-ingo.rohloff@lauterbach.com>
On Tue, Sep 01, 2026 at 02:09:08PM +0200, Ingo Rohloff wrote:
> This fixes commit 5eb5c72c72fe ("USB: gadget: ffs: fix mm lifetime
> handling"). The problem is that the previous patch calls mmgrab() for
> reads and writes, but it only calls mmdrop() for reads. So with each
> completed async IO write (via an USB IN endpoint) the number of mm_count
> increases.
>
> Signed-off-by: Ingo Rohloff <ingo.rohloff@lauterbach.com>
> ---
> drivers/usb/gadget/function/f_fs.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/usb/gadget/function/f_fs.c b/drivers/usb/gadget/function/f_fs.c
> index 9dec09d06ca9..0be989c7c23f 100644
> --- a/drivers/usb/gadget/function/f_fs.c
> +++ b/drivers/usb/gadget/function/f_fs.c
> @@ -884,8 +884,8 @@ static void ffs_user_copy_worker(struct work_struct *work)
> } else {
> ret = -EFAULT;
> }
> - mmdrop(io_data->mm);
> }
> + mmdrop(io_data->mm);
>
> io_data->kiocb->ki_complete(io_data->kiocb, ret);
>
> --
> 2.55.0
>
Hi Ingo,
This looks correct to me, and has been reported to me separately. Can
you resend this change on its own ahead of the rest of the series and
include the Fixes: and Cc: stable tags as Hongyu already pointed out?
With that:
Reviewed-by: Neill Kapron <nkapron@google.com>
Thanks,
Neill
prev parent reply other threads:[~2026-11-06 22:53 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-01 12:09 [PATCH 0/3] usb: gadget: f_fs: cancellation and mm fixes Ingo Rohloff
2026-09-01 12:09 ` [PATCH 1/3] usb: gadget: f_fs: simplify error handling using goto Ingo Rohloff
2026-11-06 23:13 ` Neill Kapron
2026-09-01 12:09 ` [PATCH 2/3] usb: gadget: f_fs: register cancellation handler only after request queueing Ingo Rohloff
2026-11-06 22:47 ` Neill Kapron
2026-09-01 12:09 ` [PATCH 3/3] usb: gadget: f_fs: Fix mmgrab()/mmdrop() balance Ingo Rohloff
2026-10-30 8:19 ` Hongyu Xie
2026-11-06 22:53 ` Neill Kapron [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=au5aaGJzgMwEw-3j@google.com \
--to=nkapron@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=ingo.rohloff@lauterbach.com \
--cc=linux-usb@vger.kernel.org \
--cc=me@samcday.com \
--cc=michael.bommarito@gmail.com \
--cc=viro@zeniv.linux.org.uk \
--cc=xiehongyu1@kylinos.cn \
/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