Skip to content
Commit c346c629 authored by Fedor Pchelkin's avatar Fedor Pchelkin Committed by David Sterba
Browse files

btrfs: qgroup: don't use extent changeset when not needed



The local extent changeset is passed to clear_record_extent_bits() where
it may have some additional memory dynamically allocated for ulist. When
qgroup is disabled, the memory is leaked because in this case the
changeset is not released upon __btrfs_qgroup_release_data() return.

Since the recorded contents of the changeset are not used thereafter, just
don't pass it.

Found by Linux Verification Center (linuxtesting.org) with Syzkaller.

Reported-by: default avatar <syzbot+81670362c283f3dd889c@syzkaller.appspotmail.com>
Closes: https://lore.kernel.org/lkml/000000000000aa8c0c060ade165e@google.com


Fixes: af0e2aab ("btrfs: qgroup: flush reservations during quota disable")
CC: stable@vger.kernel.org # 6.10+
Reviewed-by: default avatarBoris Burkov <boris@bur.io>
Reviewed-by: default avatarQu Wenruo <wqu@suse.com>
Signed-off-by: default avatarFedor Pchelkin <pchelkin@ispras.ru>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent ecb54277
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment