summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin
diff options
context:
space:
mode:
authorQu Wenruo <wqu@suse.com>2026-10-09 08:43:39 +1030
committerDavid Sterba <dsterba@suse.com>2026-10-12 19:18:10 +0200
commit940983a3000361ddff834a1c55bdb0e9e47ed88b (patch)
tree440c98e68b5cd77565084e97fcbab3f72d8abef1 /tools/perf/scripts/python/bin
parent9985f1643ac3f8595862e2f82108f0ccae4cf959 (diff)
downloadlinux-940983a3000361ddff834a1c55bdb0e9e47ed88b.tar.gz
linux-940983a3000361ddff834a1c55bdb0e9e47ed88b.zip
btrfs: prevent use-after-free in btrfs_transaction::switch_commits
If a transaction is aborted during committing, btrfs_transaction::switch_commits can be non-empty, but the btrfs_transaction structure can be freed at the last btrfs_put_transaction() inside cleanup_transaction(). The btrfs_root::dirty_list entry still linked into switch_commits will point to already released memory, causing use-after-free. Address this problem by manually deleting all entries inside btrfs_transaction::switch_commits. And since we're here, also release the dirty_log_pages and qgroup swapped blocks for that root, which are only released during a successful switch_commit_roots() call. Reviewed-by: Boris Burkov <boris@bur.io> Signed-off-by: Qu Wenruo <wqu@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions