svn commit: r344754 - head/sys/fs/ext2fs
Fedor Uporov
fsu at FreeBSD.org
Mon Mar 4 11:12:20 UTC 2019
Author: fsu
Date: Mon Mar 4 11:12:19 2019
New Revision: 344754
URL: https://svnweb.freebsd.org/changeset/base/344754
Log:
Do not panic if inode bitmap is corrupted.
admbug: 804
Reported by: Ilja Van Sprundel <ivansprundel at ioactive.com>
Reviewed by: pfg
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D19325
Modified:
head/sys/fs/ext2fs/ext2_alloc.c
Modified: head/sys/fs/ext2fs/ext2_alloc.c
==============================================================================
--- head/sys/fs/ext2fs/ext2_alloc.c Mon Mar 4 11:01:23 2019 (r344753)
+++ head/sys/fs/ext2fs/ext2_alloc.c Mon Mar 4 11:12:19 2019 (r344754)
@@ -1318,10 +1318,12 @@ ext2_nodealloccg(struct inode *ip, int cg, daddr_t ipr
start = 0;
loc = memcchr(&ibp[start], 0xff, len);
if (loc == NULL) {
- printf("cg = %d, ipref = %lld, fs = %s\n",
+ printf("ext2fs: inode bitmap corrupted: "
+ "cg = %d, ipref = %lld, fs = %s - run fsck\n",
cg, (long long)ipref, fs->e2fs_fsmnt);
- panic("ext2fs_nodealloccg: map corrupted");
- /* NOTREACHED */
+ brelse(bp);
+ EXT2_LOCK(ump);
+ return (0);
}
}
ipref = (loc - ibp) * NBBY + ffs(~*loc) - 1;
More information about the svn-src-all
mailing list