projects
/
platform
/
kernel
/
linux-rpi.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
gfs2: Check sb_bsize_shift after reading superblock
[platform/kernel/linux-rpi.git]
/
fs
/
gfs2
/
ops_fstype.c
diff --git
a/fs/gfs2/ops_fstype.c
b/fs/gfs2/ops_fstype.c
index
7f8410d
..
89efb3d
100644
(file)
--- a/
fs/gfs2/ops_fstype.c
+++ b/
fs/gfs2/ops_fstype.c
@@
-180,7
+180,10
@@
static int gfs2_check_sb(struct gfs2_sbd *sdp, int silent)
pr_warn("Invalid block size\n");
return -EINVAL;
}
-
+ if (sb->sb_bsize_shift != ffs(sb->sb_bsize) - 1) {
+ pr_warn("Invalid block size shift\n");
+ return -EINVAL;
+ }
return 0;
}