Date: Mon, 18 Mar 2019 12:26:25 +0000 (UTC) From: Fedor Uporov <fsu@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345270 - stable/12/sys/fs/ext2fs Message-ID: <201903181226.x2ICQPN4097843@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201903181226.x2ICQPN4097843>