]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
bcachefs: Add a better limit for maximum number of buckets
authorKent Overstreet <kent.overstreet@linux.dev>
Sat, 4 May 2024 17:26:37 +0000 (13:26 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Mon, 6 May 2024 14:58:17 +0000 (10:58 -0400)
commitdb42549d402cb44fe67c95d08f1a9ea902d32e7e
tree031244e3d77637c1f0bcfdbd8a08c950ce2b2c10
parent18b4abcead744322feb90ba31450e7d770e928bd
bcachefs: Add a better limit for maximum number of buckets

The bucket_gens array is a single array allocation (one byte per
bucket), and kernel allocations are still limited to INT_MAX.

Check this limit to avoid failing the bucket_gens array allocation.

Reported-by: syzbot+b29f436493184ea42e2b@syzkaller.appspotmail.com
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/bcachefs_format.h
fs/bcachefs/errcode.h
fs/bcachefs/sb-members.c
fs/bcachefs/super.c