summaryrefslogtreecommitdiff
path: root/fs/proc/proc_net.c
diff options
context:
space:
mode:
authorLiu Shixin <liushixin2@huawei.com>2022-04-30 00:38:04 +0300
committerakpm <akpm@linux-foundation.org>2022-04-30 00:38:04 +0300
commitf6e2c20ca7604e6a267c93a511d19dda72573be1 (patch)
tree3302a5e2e1faba0acc55671c81529a4b5f07ef77 /fs/proc/proc_net.c
parentedc73c7261ca3ea79867437bb0b9dab0e232436c (diff)
downloadlinux-f6e2c20ca7604e6a267c93a511d19dda72573be1.tar.xz
fs: sysv: check sbi->s_firstdatazone in complete_read_super
sbi->s_firstinodezone is initialized to 2 and sbi->s_firstdatazone is read from sbd. There's no guarantee that sbi->s_firstdatazone must bigger than sbi->s_firstinodezone. If sbi->s_firstdatazone less than 2, the filesystem can still be mounted unexpetly. At this point, sbi->s_ninodes flip to very large value and this filesystem is broken. We can observe this by executing 'df' command. When we execute, we will get an error message: "sysv_count_free_inodes: unable to read inode table" Link: https://lkml.kernel.org/r/20220330104215.530223-1-liushixin2@huawei.com Signed-off-by: Liu Shixin <liushixin2@huawei.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'fs/proc/proc_net.c')
0 files changed, 0 insertions, 0 deletions