From: Andreas Haumer <andreas@xss.co.at>
To: Andre Noll <maan@systemlinux.org>
Cc: linux-raid@vger.kernel.org, Neil Brown <neilb@suse.de>
Subject: Re: mdadm-2.2 SEGFAULT: mdadm --assemble --scan
Date: Sat, 31 Dec 2005 16:17:13 +0100 [thread overview]
Message-ID: <43B6A0F9.8040100@xss.co.at> (raw)
In-Reply-To: <20051222205809.GC492@skl-net.de>
[-- Attachment #1: Type: text/plain, Size: 1198 bytes --]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi!
Andre Noll schrieb:
> sorry if this is already known/fixed: Assemble() is called from mdadm.c with
> the "update" argument equal to NULL:
>
> Assemble(ss, array_list->devname, mdfd, array_list, configfile,
> NULL, readonly, runstop, NULL, verbose-quiet, force);
>
> But in Assemble.c we have
>
> if (ident->uuid_set && (!update && strcmp(update, "uuid")!= 0) && ...
>
> which yields a segfault in glibc's strcmp().
>
I just found the same problem after upgrading to mdadm-2.2
The logic to test for update not being NULL seems to be
reversed.
I created a small patch which seems to cure the problem
(see attached file)
HTH
- - andreas
- --
Andreas Haumer | mailto:andreas@xss.co.at
*x Software + Systeme | http://www.xss.co.at/
Karmarschgasse 51/2/20 | Tel: +43-1-6060114-0
A-1100 Vienna, Austria | Fax: +43-1-6060114-71
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFDtqD0xJmyeGcXPhERAsdiAJ0Ve787gscq4VOGtT+9Qp3k62iUEgCgs9pH
Ekg0gkLEk+99XXHw+1ezdu8=
=rh66
-----END PGP SIGNATURE-----
[-- Attachment #2: update_uuid.patch --]
[-- Type: text/plain, Size: 697 bytes --]
Index: mdadm/Assemble.c
===================================================================
RCS file: /home/cvs/repository/distribution/Utilities/mdadm/Assemble.c,v
retrieving revision 1.1.1.7
diff -u -r1.1.1.7 Assemble.c
--- mdadm/Assemble.c 5 Dec 2005 05:56:20 -0000 1.1.1.7
+++ mdadm/Assemble.c 31 Dec 2005 15:01:34 -0000
@@ -219,7 +219,7 @@
}
if (dfd >= 0) close(dfd);
- if (ident->uuid_set && (!update && strcmp(update, "uuid")!= 0) &&
+ if (ident->uuid_set && (update && strcmp(update, "uuid")!= 0) &&
(!super || same_uuid(info.uuid, ident->uuid, tst->ss->swapuuid)==0)) {
if ((inargv && verbose >= 0) || verbose > 0)
fprintf(stderr, Name ": %s has wrong uuid.\n",
next prev parent reply other threads:[~2005-12-31 15:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-22 20:58 mdadm-2.2 SEGFAULT: mdadm --assemble --scan Andre Noll
2005-12-31 15:17 ` Andreas Haumer [this message]
2006-01-08 21:23 ` Bill Davidsen
2006-01-11 13:51 ` Andreas Haumer
2006-01-24 6:28 ` Neil Brown
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=43B6A0F9.8040100@xss.co.at \
--to=andreas@xss.co.at \
--cc=linux-raid@vger.kernel.org \
--cc=maan@systemlinux.org \
--cc=neilb@suse.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.