From: Karel Zak <kzak@redhat.com>
To: Davidlohr Bueso <dave@gnu.org>
Cc: Francesco Cosoleto <cosoleto@gmail.com>,
util-linux <util-linux@vger.kernel.org>
Subject: Re: [PATCH] fdisk: fix segfault on bsd label
Date: Fri, 4 May 2012 20:59:41 +0200 [thread overview]
Message-ID: <20120504185941.GE11606@x2.net.home> (raw)
In-Reply-To: <1336151310.13569.0.camel@offworld>
On Fri, May 04, 2012 at 07:08:30PM +0200, Davidlohr Bueso wrote:
> On Fri, 2012-05-04 at 15:53 +0200, Francesco Cosoleto wrote:
> > 2012/5/4 Davidlohr Bueso <dave@gnu.org>:
> > > From: Davidlohr Bueso <dave@gnu.org>
> > >
> > > Commit 8db8295d824cd0c8cba9385e4635d6e311d69d3f added a regression that causes the program to crash when
> > > touching the partition structure (pte) for BSD/OSF labels. Since DOS has its own initialization function,
> > > allow BSD labels to use it as well.
> > >
> > > Steps to reproduce:
> > >
> > > $> fdisk bsd.img (obtained from blkid regression test files)
> > > Command (m for help): p
> > > ...
> > > I/O size (minimum/optimal): 512 bytes / 512 bytes
> > > Disk identifier: 0x00000000
> > >
> > > Segmentation fault
> >
> > Thanks Davidlohr for pointing out that regression. Does it occurs with
> > the command to print the partition table when the drive has a BSD
> > label and hasn't a valid DOS label, and it has no partition? Fdisk
> > switches from BSD label to DOS label without initializing DOS
> > structures, right?
>
> From my analysis, yes.
Just note that some labels are nested -- for example BSD, minix
unixware, ... are subtypes (nested partition tables) within DOS.
This parent->child relationship will be also necessary to support
in new fdisk API.
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
next prev parent reply other threads:[~2012-05-04 18:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-04 11:35 [PATCH] fdisk: fix segfault on bsd label Davidlohr Bueso
2012-05-04 13:53 ` Francesco Cosoleto
2012-05-04 17:08 ` Davidlohr Bueso
2012-05-04 18:59 ` Karel Zak [this message]
2012-05-10 9:46 ` Karel Zak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120504185941.GE11606@x2.net.home \
--to=kzak@redhat.com \
--cc=cosoleto@gmail.com \
--cc=dave@gnu.org \
--cc=util-linux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox