All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Ahmet Eray Karadag <eraykrdg1@gmail.com>
Cc: clm@fb.com, dsterba@suse.com, linux-btrfs@vger.kernel.org,
	linux-kernel@vger.kernel.org, david.hunter.linux@gmail.com,
	skhan@linuxfoundation.org,
	syzbot+2f8aa76e6acc9fce6638@syzkaller.appspotmail.com
Subject: Re: [PATCH] btrfs: fix qgroup extent_changeset leak in page_mkwrite
Date: Fri, 12 Dec 2025 16:41:37 +0100	[thread overview]
Message-ID: <20251212154137.GA3195@suse.cz> (raw)
In-Reply-To: <20251212050947.148242-2-eraykrdg1@gmail.com>

On Fri, Dec 12, 2025 at 08:09:48AM +0300, Ahmet Eray Karadag wrote:
> syzbot reported a memory leak originating from ulist_prealloc()
> called from qgroup_reserve_data() in the btrfs_page_mkwrite()
> path. When btrfs_check_data_free_space() succeeds and
> btrfs_delalloc_reserve_metadata() later fails, we free the data
> reservation via btrfs_free_reserved_data_space(), but we never
> free the extent_changeset pointed to by data_reserved.
> 
> Add the missing extent_changeset_free(data_reserved) in this
> error path, matching the other exit paths in btrfs_page_mkwrite()
> and the failure handling in btrfs_check_data_free_space().
> 
> Reported-by: syzbot+2f8aa76e6acc9fce6638@syzkaller.appspotmail.com
> Closes: https://syzkaller.appspot.com/bug?extid=2f8aa76e6acc9fce6638
> Signed-off-by: Ahmet Eray Karadag <eraykrdg1@gmail.com>

Thanks a fix is already available and will be in linux-next. Pull
request with the fix will be sent after rc1.

      parent reply	other threads:[~2025-12-12 15:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-12  5:09 [PATCH] btrfs: fix qgroup extent_changeset leak in page_mkwrite Ahmet Eray Karadag
2025-12-12  6:34 ` Qu Wenruo
2025-12-12 15:41 ` 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=20251212154137.GA3195@suse.cz \
    --to=dsterba@suse.cz \
    --cc=clm@fb.com \
    --cc=david.hunter.linux@gmail.com \
    --cc=dsterba@suse.com \
    --cc=eraykrdg1@gmail.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=skhan@linuxfoundation.org \
    --cc=syzbot+2f8aa76e6acc9fce6638@syzkaller.appspotmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.