diff options
| author | Filipe Manana <fdmanana@suse.com> | 2026-09-18 17:41:28 +0100 |
|---|---|---|
| committer | David Sterba <dsterba@suse.com> | 2026-10-12 19:16:22 +0200 |
| commit | 057e3c350a9185df598c88b4081168ed047c9247 (patch) | |
| tree | 20a947caeef67284d234c67dfa94b60423dbf81d /tools/perf/scripts/python/stackcollapse.py | |
| parent | 21721221e5cc9357366137e8dd1dbf349dc58ff0 (diff) | |
| download | linux-057e3c350a9185df598c88b4081168ed047c9247.tar.gz linux-057e3c350a9185df598c88b4081168ed047c9247.zip | |
btrfs: fix dangling nodes in tree-mod-log after error in btrfs_tree_mod_log_insert_root()
If in btrfs_tree_mod_log_insert_root() there is an error in the call to
tree_mod_log_insert() (the only possible error is -EEXIST, which means we
have a bug or some memory corruption maybe) we free all the nodes in the
'tm_list' array but we don't remove them from the tree-mod-log rbtree,
which can result in use-after-free bugs later.
So make sure we remove the nodes from the rbtree before freeing them after
an error.
Fixes: 5de865eebb83 ("Btrfs: fix tree mod logging")
Assisted-by: LLM (found the bug)
Reviewed-by: Boris Burkov <boris@bur.io>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions
