[prev in list] [next in list] [prev in thread] [next in thread] 

List:       libguestfs
Subject:    Re: [Libguestfs] [PATCH 1/2] inspection: Handle MD devices in fstab
From:       "Richard W.M. Jones" <rjones () redhat ! com>
Date:       2011-11-30 12:30:57
Message-ID: 20111130123057.GZ706 () amd ! home ! annexia ! org
[Download RAW message or body]

On Fri, Nov 25, 2011 at 05:32:42PM +0000, Matthew Booth wrote:
> This patch fixes inspection when fstab contains devices md devices
> specified as /dev/mdN. The appliance creates these devices without reference to
> the guest's mdadm.conf so, for e.g. /dev/md0 in the guest will often be created
> as /dev/md127 in the appliance. With this patch, we match the uuids of detected
> md devices against uuids specified in mdadm.conf, and map them appropriately
> when we encounter them in fstab.

NACK.

If there are no MD devices, md_map is returned as NULL, and that
causes hash_free to segfault.  It would also cause other places to
segfault, eg. if there were no MD devices but /etc/fstab referenced
one (causing hash_lookup (NULL) to be called).

This problem was revealed by running test-inspect-fstab.sh.  Please
run all the tests!  Running 'make extra-tests' is a good idea too.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://et.redhat.com/~rjones/virt-top

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic