Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Wentao Liang <vulab@iscas.ac.cn>
Cc: clm@fb.com, dsterba@suse.com, linux-btrfs@vger.kernel.org,
	linux-kernel@vger.kernel.org, list.btrfs@jan-o-sch.net,
	stable@vger.kernel.org
Subject: Re: [PATCH] btrfs: Fix local_root reference leak in scrub_print_warning_inode()
Date: Mon, 21 Sep 2026 14:28:11 +0200	[thread overview]
Message-ID: <20260921122811.GA54722@twin.jikos.cz> (raw)
In-Reply-To: <20260916171610.2086918-1-vulab@iscas.ac.cn>

On Wed, Sep 16, 2026 at 05:16:10PM +0000, Wentao Liang wrote:
> When paths_from_inode() fails, scrub_print_warning_inode() jumps to
> err without dropping the reference taken by btrfs_get_fs_root(),
> leaking a reference to the root every time path resolution fails while
> printing scrub warnings.  Every other error and success path of the
> function drops the reference.
> 
> Drop the reference on the paths_from_inode() failure path too.
> 
> Fixes: 558540c17771 ("btrfs scrub: print paths of corrupted files")
> Cc: stable@vger.kernel.org
> Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>

Added to for-next, thanks.

      parent reply	other threads:[~2026-09-21 12:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-16 17:16 [PATCH] btrfs: Fix local_root reference leak in scrub_print_warning_inode() Wentao Liang
2026-09-16 21:44 ` Qu Wenruo
2026-09-21 12:28 ` David Sterba [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=20260921122811.GA54722@twin.jikos.cz \
    --to=dsterba@suse.cz \
    --cc=clm@fb.com \
    --cc=dsterba@suse.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=list.btrfs@jan-o-sch.net \
    --cc=stable@vger.kernel.org \
    --cc=vulab@iscas.ac.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