Commit 50a8a73
bcachefs: fix invalid memory access in bch2_fs_alloc() error path
When bch2_fs_alloc() gets an error before calling
bch2_fs_btree_iter_init(), bch2_fs_btree_iter_exit() makes an invalid
memory access because btree_trans_list is uninitialized.
Signed-off-by: Thomas Bertschinger <tahbertschinger@gmail.com>
Fixes: 6bd68ec ("bcachefs: Heap allocate btree_trans")
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>1 parent 8bf7719 commit 50a8a73
3 files changed
Lines changed: 8 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3214 | 3214 | | |
3215 | 3215 | | |
3216 | 3216 | | |
3217 | | - | |
| 3217 | + | |
3218 | 3218 | | |
3219 | 3219 | | |
3220 | | - | |
3221 | 3220 | | |
3222 | 3221 | | |
3223 | 3222 | | |
| |||
3228 | 3227 | | |
3229 | 3228 | | |
3230 | 3229 | | |
| 3230 | + | |
| 3231 | + | |
| 3232 | + | |
| 3233 | + | |
| 3234 | + | |
3231 | 3235 | | |
3232 | 3236 | | |
3233 | 3237 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
938 | 938 | | |
939 | 939 | | |
940 | 940 | | |
| 941 | + | |
941 | 942 | | |
942 | 943 | | |
943 | 944 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
714 | 714 | | |
715 | 715 | | |
716 | 716 | | |
| 717 | + | |
717 | 718 | | |
718 | 719 | | |
719 | 720 | | |
| |||
0 commit comments