On Wed, 01 Aug 2007 18:24:18 +0200
Jim Meyering <[EMAIL PROTECTED]> wrote:

> David Cantrell <[EMAIL PROTECTED]> wrote:
> > The /proc/partitions file is looked at only if /sys/block isn't
> > available.  On my system, I had /sys/block available and there was one
> > node that showed up that caused parted to crash.  That node was md0.
> > There were no software RAID devices on the system at all.  /sys/block/md0
> > was bogus.  But since libparted found it during the device probe, it
> > tried to read a label from it.  Crash.
> 
> Doesn't that mean the label-reading code is at fault?

I don't think so.  For this particular case, the disk label type was unknown, 
so libparted passed it through all the scanning routines to see if it could 
figure it out.

> > ...
> 
> Thanks for the details.
> 
> BTW, if you keep that patch on stable-1.8.x, then you should call
> ped_disk_destroy when ped_disk_new succeeds, to avoid leaking.

I revisited this issue today because the reporter (QA guy at Red Hat) indicated 
that my fix only partly worked and parted was still crashing.  My patch to 
check the return of ped_disk_new() isn't really what I wanted.  That was 
removing the disk from the list of detected devices if parted couldn't figure 
out the disk label type.  That's bad, because then we could never run parted on 
a disk with an unknown label...that means unpartitioned disks.  :)

Ooops.  So I've removed that and tracked down what the real problem was and 
have a fix to work around it.  I am fairly certain it's specific to s390x only 
as that's what the reporter was using and it's the only system type I could 
reproduce the error on.

Working locally, will post new patches when I have those done.

-- 
David Cantrell <[EMAIL PROTECTED]>
Red Hat / Westford, MA

Attachment: pgpmruDRNbllC.pgp
Description: PGP signature

_______________________________________________
parted-devel mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/parted-devel

Reply via email to