[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <199958a3dfc.76910e49549391.5634075750839417784@linux.beauty>
Date: Mon, 29 Sep 2025 20:54:49 +0800
From: Li Chen <me@...ux.beauty>
To: "yangerkun" <yangerkun@...wei.com>
Cc: "Jens Axboe" <axboe@...nel.dk>,
"linux-block" <linux-block@...r.kernel.org>,
"linux-kernel" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] loop: fix backing file reference leak on validation
error
Hi Erkun,
---- On Sun, 28 Sep 2025 09:54:51 +0800 yangerkun <yangerkun@...wei.com> wrote ---
>
>
> 在 2025/9/26 20:12, Li Chen 写道:
> > loop_change_fd() and loop_configure() call loop_check_backing_file()
> > to validate the new backing file. If validation fails, the reference
> > acquired by fget() was not dropped, leaking a file reference.
> >
> > Fix this by calling fput(file) before returning the error.
> >
> > Signed-off-by: Li Chen <chenl311@...natelecom.cn>
>
> You'd better add a fix tag:
>
> Fixes: f5c84eff634b ("loop: Add sanity check for read/write_iter")
Thanks, I would add it in v2.
Regards,
Li
Powered by blists - more mailing lists