]> www.infradead.org Git - users/dwmw2/linux.git/commit
bcachefs: Fix kmalloc bug in __snapshot_t_mut
authorPei Li <peili.dev@gmail.com>
Wed, 26 Jun 2024 00:39:56 +0000 (17:39 -0700)
committerKent Overstreet <kent.overstreet@linux.dev>
Wed, 26 Jun 2024 00:51:14 +0000 (20:51 -0400)
commit64cd7de998f393e73981e2aa4ee13e4e887f01ea
tree1552c78f0e8f48e3851db9440f6818160888a996
parent64ee1431cc7d11e01a1007ead0afe737781cbbab
bcachefs: Fix kmalloc bug in __snapshot_t_mut

When allocating too huge a snapshot table, we should fail gracefully
in __snapshot_t_mut() instead of fail in kmalloc().

Reported-by: syzbot+770e99b65e26fa023ab1@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=770e99b65e26fa023ab1
Tested-by: syzbot+770e99b65e26fa023ab1@syzkaller.appspotmail.com
Signed-off-by: Pei Li <peili.dev@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/snapshot.c