projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
75e0c47
)
bcachefs: bch2_ioctl_disk_resize_journal(): check for integer truncation
author
Kent Overstreet
<kent.overstreet@linux.dev>
Wed, 20 Sep 2023 02:26:18 +0000
(22:26 -0400)
committer
Kent Overstreet
<kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:10:14 +0000
(17:10 -0400)
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/chardev.c
patch
|
blob
|
history
diff --git
a/fs/bcachefs/chardev.c
b/fs/bcachefs/chardev.c
index
51d6712
..
e8b6733
100644
(file)
--- a/
fs/bcachefs/chardev.c
+++ b/
fs/bcachefs/chardev.c
@@
-627,6
+627,9
@@
static long bch2_ioctl_disk_resize_journal(struct bch_fs *c,
arg.pad)
return -EINVAL;
+ if (arg.nbuckets > U32_MAX)
+ return -EINVAL;
+
ca = bch2_device_lookup(c, arg.dev, arg.flags);
if (IS_ERR(ca))
return PTR_ERR(ca);