Author: fsu Date: Mon Mar 18 12:26:25 2019 New Revision: 345270 URL: https://svnweb.freebsd.org/changeset/base/345270
Log: MFC: r344754: Do not panic if inode bitmap is corrupted. admbug: 804 Reported by: Ilja Van Sprundel Reviewed by: pfg Differential Revision: https://reviews.freebsd.org/D19325 Modified: stable/12/sys/fs/ext2fs/ext2_alloc.c Modified: stable/12/sys/fs/ext2fs/ext2_alloc.c ============================================================================== --- stable/12/sys/fs/ext2fs/ext2_alloc.c Mon Mar 18 12:22:23 2019 (r345269) +++ stable/12/sys/fs/ext2fs/ext2_alloc.c Mon Mar 18 12:26:25 2019 (r345270) @@ -1350,10 +1350,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; _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"