We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1d5dd3b commit be9a7b3Copy full SHA for be9a7b3
fs/squashfs/super.c
@@ -16,6 +16,7 @@
16
17
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
18
19
+#include <linux/blkdev.h>
20
#include <linux/fs.h>
21
#include <linux/fs_context.h>
22
#include <linux/fs_parser.h>
@@ -179,8 +180,8 @@ static int squashfs_fill_super(struct super_block *sb, struct fs_context *fc)
179
180
/* Check the filesystem does not extend beyond the end of the
181
block device */
182
msblk->bytes_used = le64_to_cpu(sblk->bytes_used);
- if (msblk->bytes_used < 0 || msblk->bytes_used >
183
- i_size_read(sb->s_bdev->bd_inode))
+ if (msblk->bytes_used < 0 ||
184
+ msblk->bytes_used > bdev_nr_bytes(sb->s_bdev))
185
goto failed_mount;
186
187
/* Check block size for sanity */
0 commit comments