]> git.baikalelectronics.ru Git - kernel.git/commit
fs/minix: Verify bitmap block counts before mounting
authorJosh Boyer <jwboyer@redhat.com>
Fri, 19 Aug 2011 18:50:26 +0000 (14:50 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Sat, 19 Nov 2011 16:13:26 +0000 (11:13 -0500)
commit7fa5fde4223ef58690ffa03781dab58e8cd6e07d
tree3e237994b81e284ad58acc75f37b4c8d4aefbdf3
parent0d6fe1fee1e9f03fb09e5c8512b2c3f500a2b5b5
fs/minix: Verify bitmap block counts before mounting

Newer versions of MINIX can create filesystems that allocate an extra
bitmap block.  Mounting of this succeeds, but doing a statfs call will
result in an oops in count_free because of a negative number being used
for the bh index.

Avoid this by verifying the number of allocated blocks at mount time,
erroring out if there are not enough and make statfs ignore the extras
if there are too many.

This fixes https://bugzilla.kernel.org/show_bug.cgi?id=18792

Signed-off-by: Josh Boyer <jwboyer@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/minix/bitmap.c
fs/minix/inode.c
fs/minix/minix.h