Linux block layer
 help / color / mirror / Atom feed
From: Li Chen <me@linux.beauty>
To: "Ming Lei" <ming.lei@redhat.com>
Cc: "Markus Elfring" <Markus.Elfring@web.de>,
	"Li Chen" <chenl311@chinatelecom.cn>,
	"linux-block" <linux-block@vger.kernel.org>,
	"Jens Axboe" <axboe@kernel.dk>,
	"LKML" <linux-kernel@vger.kernel.org>,
	"Yang Erkun" <yangerkun@huawei.com>
Subject: Re: [PATCH] loop: fix backing file reference leak on validation error
Date: Tue, 30 Sep 2025 08:05:21 +0800	[thread overview]
Message-ID: <19997f021ec.1a9fd75f968161.8895471846650325801@linux.beauty> (raw)
In-Reply-To: <CAFj5m9+FGzRV+fsWtsVSHV4JFh9Pit-KFHiKRWtMKBpM9LWBhQ@mail.gmail.com>

Hi Ming,

 ---- On Mon, 29 Sep 2025 23:01:50 +0800  Ming Lei <ming.lei@redhat.com> wrote --- 
 > On Mon, Sep 29, 2025 at 8:54 PM Li Chen <me@linux.beauty> wrote:
 > >
 > > Hi Markus,
 > >
 > >  ---- On Sun, 28 Sep 2025 21:48:23 +0800  Markus Elfring <Markus.Elfring@web.de> wrote ---
 > >  > …
 > >  > > Fix this by calling fput(file) before returning the error.
 > >  > …
 > >  > > +++ b/drivers/block/loop.c
 > >  > …
 > >  >
 > >  > How do you think about to increase the application of scope-based resource management?
 > >  > https://elixir.bootlin.com/linux/v6.17-rc7/source/include/linux/file.h#L97
 > >
 > > Looks good; I will add a commit to switch to scope-based resource management in v2.
 > > Thanks for your suggestion!
 > 
 > Please don't do it as one bug fix, the whole fix chain needs to
 > backport, and scope-based
 > fput is just added in v6.15.
 > 
 > However, you can do it as one cleanup after the fix is merged.

Noted, thanks for your tip.

Regards,
Li

  reply	other threads:[~2025-09-30  0:05 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-26 12:12 [PATCH] loop: fix backing file reference leak on validation error Li Chen
2025-09-28  1:54 ` yangerkun
2025-09-29 12:54   ` Li Chen
2025-09-28 13:48 ` Markus Elfring
2025-09-29 12:53   ` Li Chen
2025-09-29 15:01     ` Ming Lei
2025-09-30  0:05       ` Li Chen [this message]
2025-09-29  1:11 ` Yu Kuai
2025-09-29 12:56   ` Li Chen
2025-09-29  5:14 ` Ming Lei

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=19997f021ec.1a9fd75f968161.8895471846650325801@linux.beauty \
    --to=me@linux.beauty \
    --cc=Markus.Elfring@web.de \
    --cc=axboe@kernel.dk \
    --cc=chenl311@chinatelecom.cn \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ming.lei@redhat.com \
    --cc=yangerkun@huawei.com \
    /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