mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 08:33:17 +02:00
bcachefs: Fix null ptr deref in bch2_snapshot_tree_oldest_subvol()
Reported-by: syzbot+baee8591f336cab0958b@syzkaller.appspotmail.com Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
4c0d2c67ac
commit
aa6a591f0f
|
|
@ -396,7 +396,7 @@ u32 bch2_snapshot_tree_oldest_subvol(struct bch_fs *c, u32 snapshot_root)
|
|||
u32 subvol = 0, s;
|
||||
|
||||
rcu_read_lock();
|
||||
while (id) {
|
||||
while (id && bch2_snapshot_exists(c, id)) {
|
||||
s = snapshot_t(c, id)->subvol;
|
||||
|
||||
if (s && (!subvol || s < subvol))
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user