From: Sun Yangkai <sunk67188@gmail.com>
To: Dan Carpenter <dan.carpenter@linaro.org>
Cc: Chris Mason <clm@fb.com>, David Sterba <dsterba@suse.com>,
linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH next] btrfs: tests: Fix double free in remove_extent_ref()
Date: Fri, 28 Nov 2025 12:11:59 +0800 [thread overview]
Message-ID: <4c96af12-cf44-4028-b3c4-4ce9314c4733@gmail.com> (raw)
In-Reply-To: <aSf6UHCbZrgZCQ1L@stanley.mountain>
Thanks. My bad.
在 2025/11/27 15:14, Dan Carpenter 写道:
> We converted this code to use auto free cleanup.h magic but one old
> school free was accidentally left behind which leads to a double free
> bug.
>
> Fixes: a320476ca8a3 ("btrfs: tests: do trivial BTRFS_PATH_AUTO_FREE conversions")
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
> ---
> fs/btrfs/tests/qgroup-tests.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/fs/btrfs/tests/qgroup-tests.c b/fs/btrfs/tests/qgroup-tests.c
> index 05cfda8af422..e9124605974b 100644
> --- a/fs/btrfs/tests/qgroup-tests.c
> +++ b/fs/btrfs/tests/qgroup-tests.c
> @@ -187,7 +187,6 @@ static int remove_extent_ref(struct btrfs_root *root, u64 bytenr,
> ret = btrfs_search_slot(&trans, root, &key, path, -1, 1);
> if (ret) {
> test_err("couldn't find backref %d", ret);
> - btrfs_free_path(path);
> return ret;
> }
> btrfs_del_item(&trans, root, path);
prev parent reply other threads:[~2025-11-28 4:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-27 7:14 Dan Carpenter
2025-11-27 17:29 ` David Sterba
2025-11-28 4:11 ` Sun Yangkai [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=4c96af12-cf44-4028-b3c4-4ce9314c4733@gmail.com \
--to=sunk67188@gmail.com \
--cc=clm@fb.com \
--cc=dan.carpenter@linaro.org \
--cc=dsterba@suse.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®