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 Link: https://lore.kernel.org/r/20260901120908.14386-4-ingo.rohloff@lauterbach.com Fixes: 5eb5c72c72fe ("USB: gadget: ffs: fix mm lifetime handling") Cc: stable@vger.kernel.org --- - Originally posted as patch 3/3 of "usb: gadget: f_fs: cancellation and mm fixes" https://lore.kernel.org/r/20260901120908.14386-1-ingo.rohloff@lauterbach.com. Resend because rest of the series is still to be discussed. 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 c64a268e98a4..704cfae49f11 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