[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20240828215632.GJ25962@twin.jikos.cz>
Date: Wed, 28 Aug 2024 23:56:32 +0200
From: David Sterba <dsterba@...e.cz>
To: Fedor Pchelkin <pchelkin@...ras.ru>
Cc: Qu Wenruo <quwenruo.btrfs@....com>, David Sterba <dsterba@...e.com>,
Chris Mason <clm@...com>, Josef Bacik <josef@...icpanda.com>,
Boris Burkov <boris@....io>, linux-btrfs@...r.kernel.org,
linux-kernel@...r.kernel.org, lvc-project@...uxtesting.org,
syzbot+81670362c283f3dd889c@...kaller.appspotmail.com,
stable@...r.kernel.org
Subject: Re: [PATCH v2] btrfs: qgroup: don't use extent changeset when not
needed
On Wed, Aug 28, 2024 at 07:14:11PM +0300, Fedor Pchelkin wrote:
> 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: syzbot+81670362c283f3dd889c@...kaller.appspotmail.com
> Closes: https://lore.kernel.org/lkml/000000000000aa8c0c060ade165e@google.com
> Fixes: af0e2aab3b70 ("btrfs: qgroup: flush reservations during quota disable")
> Cc: stable@...r.kernel.org # 6.10+
> Signed-off-by: Fedor Pchelkin <pchelkin@...ras.ru>
> ---
> v2: rework the fix as Qu Wenruo suggested - just don't pass unneeded
> changeset. Update the commit title and description accordingly.
Thanks, added to for-next.
Powered by blists - more mailing lists