[PATCH] Segfault with --assemble --force

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



mdadm --assemble --force repeatedly segfaults when run on a raid6 array with
more than two components marked as failed, so at least one needs its event
count forcibly updated. sb->events is accessed with sb NULL in update_super1,
called from Assemble (line 667 of Assemble.c). I think the following patch is
correct:

diff -uNrp mdadm-2.6.7.orig/Assemble.c mdadm-2.6.7/Assemble.c
--- mdadm-2.6.7.orig/Assemble.c	2008-06-18 20:23:36.000000000 +0100
+++ mdadm-2.6.7/Assemble.c	2008-06-18 20:23:47.000000000 +0100
@@ -656,7 +656,7 @@ int Assemble(struct supertype *st, char 
 			continue;
 		}
 		tst = dup_super(st);
-		if (tst->ss->load_super(st,fd, NULL)) {
+		if (tst->ss->load_super(tst, fd, NULL)) {
 			close(fd);
 			fprintf(stderr, Name ": RAID superblock disappeared from %s - not updating.\n",
 				devices[chosen_drive].devname);

Cheers,

Chris.
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux