Bug#593652: grub-common: grub-probe still segfaults with 1.98+20100804-6

Martin Schitter ms at mur.at
Tue Nov 2 02:00:09 UTC 2010


Am 2010-11-01 23:11, schrieb Robert Millan:
> I backported the patch, please can you test this?

i had some simple compilation errors:

../../disk/mdraid_linux.c:257: error: request for member ‘this_disk’ in 
something not a structure or union


fixed it:

--- disk/mdraid_linux.c-old	2010-11-02 02:10:23.000000000 +0100
+++ disk/mdraid_linux.c	2010-11-02 02:13:51.000000000 +0100
@@ -255,5 +255,5 @@
      return grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
  		       "unsupported RAID level: %d", sb->level);
-  if (sb.this_disk.number == 0xffff || sb.this_disk.number == 0xfffe)
+  if (sb->this_disk.number == 0xffff || sb->this_disk.number == 0xfffe)
      return grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
  		       "spares aren't implemented");


the resulting binaries seem to work fine:

root at sow:~# for array in /boot / /mnt; do echo -e "\n   testing: 
$array"; for target in fs drive device abstraction; do 
/usr/sbin/grub-probe -t $target $array; done ; done

    testing: /boot
ext2
(md/boot)
/dev/md127
raid mdraid

    testing: /
ext2
(md/root)
/dev/md125
raid mdraid

    testing: /mnt
ext2
(md0)
/dev/md0
raid mdraid


thanks for this effort!

martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mdraid-trival.diff
Type: text/x-patch
Size: 488 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-grub-devel/attachments/20101102/a419be11/attachment-0001.bin>


More information about the Pkg-grub-devel mailing list