diff options
| author | void0red <[email protected]> | 2022-11-23 14:39:45 +0000 |
|---|---|---|
| committer | David Sterba <[email protected]> | 2022-12-05 17:00:59 +0000 |
| commit | 1742e1c90c3da344f3bb9b1f1309b3f47482756a (patch) | |
| tree | ae1ef1a9bb4bfefdb186ff5626f93f81237ee107 /tools/perf/scripts/python/flamegraph.py | |
| parent | btrfs: remove outdated logic from overwrite_item() and add assertion (diff) | |
| download | kernel-1742e1c90c3da344f3bb9b1f1309b3f47482756a.tar.gz kernel-1742e1c90c3da344f3bb9b1f1309b3f47482756a.zip | |
btrfs: fix extent map use-after-free when handling missing device in read_one_chunk
Store the error code before freeing the extent_map. Though it's
reference counted structure, in that function it's the first and last
allocation so this would lead to a potential use-after-free.
The error can happen eg. when chunk is stored on a missing device and
the degraded mount option is missing.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=216721
Reported-by: eriri <[email protected]>
Fixes: adfb69af7d8c ("btrfs: add_missing_dev() should return the actual error")
CC: [email protected] # 4.9+
Signed-off-by: void0red <[email protected]>
Reviewed-by: David Sterba <[email protected]>
Signed-off-by: David Sterba <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/flamegraph.py')
0 files changed, 0 insertions, 0 deletions
