linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* mdadm 2.6.3 segfaults on assembly (v1 superblocks)
@ 2007-09-07  8:09 martin f krafft
  2007-09-24  4:28 ` Neil Brown
  0 siblings, 1 reply; 3+ messages in thread
From: martin f krafft @ 2007-09-07  8:09 UTC (permalink / raw)
  To: linux-raid mailing list

[-- Attachment #1: Type: text/plain, Size: 1934 bytes --]

Hi,

preparing the Debian package for mdadm 2.6.3, I found a segfault in
mdadm/Assemble.c:254, in the line:

  } else if (tst->ss->load_super(tst,dfd, &super, NULL)) {

the problem is that tst->ss is NULL, due to reasons I have not yet
uncovered. The segfault happens only in the second iteration of the
for loop at line 212 and the load_super1 call, caused by the above
load_super in the first iteration, causes tst->ss to be set to NULL.

This happens in the first recursion (load_super1 calls itself), at
which point the

  if (dsize < 24) {

check in super1.c:1033 fails and thus returns 1, which causes the
outer load_super1 function to return 1 after setting st->ss to NULL
in line super1.c:1013.

This all happens while the dfd variable in Assemble.c:254 has value
8, and assuming this is a file descriptor, then lsof says:

  mdadm     25664     root    8r      BLK       22,3 2806 /dev/hdc3

/dev/hdc3 is an extended partition on the disk.

/dev/hdc1   *           1           8       64228+  83  Linux
/dev/hdc2               9         132      996030   82  Linux swap / Solaris
/dev/hdc3             133       30401   243135742+   5  Extended
/dev/hdc5             133         256      995998+  83  Linux
/dev/hdc6             257         505     2000061   83  Linux
/dev/hdc7             506       28347   223640833+  83  Linux
/dev/hdc8           28348       30339    16000708+  83  Linux
/dev/hdc9           30340       30401      497983+  83  Linux

I am failing to reproduce this on v0.9 superblock systems.

Neil, could this be a bug?

-- 
martin;              (greetings from the heart of the sun.)
  \____ echo mailto: !#^."<*>"|tr "<*> mailto:" net@madduck
 
"nothing can cure the soul but the senses,
 just as nothing can cure the senses but the soul."
                                                        -- oscar wilde
 
spamtraps: madduck.bogus@madduck.net

[-- Attachment #2: Digital signature (see http://martin-krafft.net/gpg/) --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-09-30 11:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-07  8:09 mdadm 2.6.3 segfaults on assembly (v1 superblocks) martin f krafft
2007-09-24  4:28 ` Neil Brown
2007-09-30 11:37   ` martin f krafft

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).