diff options
| author | Kent Overstreet <kent.overstreet@linux.dev> | 2024-05-04 13:26:37 -0400 |
|---|---|---|
| committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-05-06 10:58:17 -0400 |
| commit | db42549d402cb44fe67c95d08f1a9ea902d32e7e (patch) | |
| tree | 031244e3d77637c1f0bcfdbd8a08c950ce2b2c10 /fs/bcachefs/errcode.h | |
| parent | 18b4abcead744322feb90ba31450e7d770e928bd (diff) | |
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>
Diffstat (limited to 'fs/bcachefs/errcode.h')
| -rw-r--r-- | fs/bcachefs/errcode.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/bcachefs/errcode.h b/fs/bcachefs/errcode.h index 01a79fa3eacb..dbe35b80bc0b 100644 --- a/fs/bcachefs/errcode.h +++ b/fs/bcachefs/errcode.h @@ -175,6 +175,7 @@ x(EINVAL, block_size_too_small) \ x(EINVAL, bucket_size_too_small) \ x(EINVAL, device_size_too_small) \ + x(EINVAL, device_size_too_big) \ x(EINVAL, device_not_a_member_of_filesystem) \ x(EINVAL, device_has_been_removed) \ x(EINVAL, device_splitbrain) \ |
