bin/187221: fsck_ufs -p segmentation fault with SU+J
Petr Lampa
lampa at fit.vutbr.cz
Mon Mar 10 12:00:02 UTC 2014
The following reply was made to PR bin/187221; it has been noted by GNATS.
From: Petr Lampa <lampa at fit.vutbr.cz>
To: bug-followup at FreeBSD.org
Cc: mckusick at mckusick.com
Subject: Re: bin/187221: fsck_ufs -p segmentation fault with SU+J
Date: Mon, 10 Mar 2014 12:43:11 +0100
Simple fix, fsck -p runs without sigsegv now:
--- fsutil.c 2013-07-10 17:04:10.000000000 +0200
+++ fsutil.c.my 2014-03-10 12:33:55.000000000 +0100
@@ -414,13 +414,15 @@
}
if (numbufs != cnt)
errx(EEXIT, "panic: lost %d buffers", numbufs - cnt);
- for (cnt = 0; cnt < sblock.fs_ncg; cnt++) {
- if (cgbufs[cnt].b_un.b_cg == NULL)
- continue;
- flush(fswritefd, &cgbufs[cnt]);
- free(cgbufs[cnt].b_un.b_cg);
+ if (cgbufs) {
+ for (cnt = 0; cnt < sblock.fs_ncg; cnt++) {
+ if (cgbufs[cnt].b_un.b_cg == NULL)
+ continue;
+ flush(fswritefd, &cgbufs[cnt]);
+ free(cgbufs[cnt].b_un.b_cg);
+ }
+ free(cgbufs);
}
- free(cgbufs);
pbp = pdirbp = (struct bufarea *)0;
if (cursnapshot == 0 && sblock.fs_clean != markclean) {
if ((sblock.fs_clean = markclean) != 0) {
Petr Lampa
--
Computer Centre E-mail: lampa at fit.vutbr.cz
Faculty of Information Technology Web: http://www.fit.vutbr.cz/
Brno University of Technology Fax: +420 54114-1270
Bozetechova 2, 612 66 Brno, Czech Republic Phone: +420 54114-1225
More information about the freebsd-bugs
mailing list