From: Neil Brown <neilb@suse.de>
To: "Hawrylewicz Czarnowski,
Przemyslaw" <przemyslaw.hawrylewicz.czarnowski@intel.com>
Cc: "linux-raid@vger.kernel.org" <linux-raid@vger.kernel.org>,
"Williams, Dan J" <dan.j.williams@intel.com>,
"Ciechanowski, Ed" <ed.ciechanowski@intel.com>
Subject: Re: [PATCH] fix: assemble for external metadata generates segfault if invalid device found
Date: Wed, 1 Dec 2010 11:06:29 +1100 [thread overview]
Message-ID: <20101201110629.7d974f3d@notabene.brown> (raw)
In-Reply-To: <66C59AD0932712458090B447266D638C0109FA94F2@irsmsx504.ger.corp.intel.com>
On Tue, 30 Nov 2010 23:49:52 +0000 "Hawrylewicz Czarnowski, Przemyslaw"
<przemyslaw.hawrylewicz.czarnowski@intel.com> wrote:
> An attempt to invoke super_by_fd() on device that has
> metadata_version="none" always matches super0 (as test_version is "").
> In Assemble() it results in segfault when load_container is invoked
> (=null for super0).
> As of now load_container is only started if it points to valid pointer.
applied, thanks.
NeilBrown
>
> Signed-off-by: Przemyslaw Czarnowski <przemyslaw.hawrylewicz.czarnowski@intel.com>
> ---
> Assemble.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/Assemble.c b/Assemble.c
> index 5e71a43..5e4296c 100644
> --- a/Assemble.c
> +++ b/Assemble.c
> @@ -332,7 +332,7 @@ int Assemble(struct supertype *st, char *mddev,
> fprintf(stderr, Name ": not a recognisable container: %s\n",
> devname);
> tmpdev->used = 2;
> - } else if (tst->ss->load_container(tst, dfd, NULL)) {
> + } else if (!tst->ss->load_container || tst->ss->load_container(tst, dfd, NULL)) {
> if (report_missmatch)
> fprintf(stderr, Name ": no correct container type: %s\n",
> devname);
prev parent reply other threads:[~2010-12-01 0:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-30 23:49 [PATCH] fix: assemble for external metadata generates segfault if invalid device found Hawrylewicz Czarnowski, Przemyslaw
2010-12-01 0:06 ` Neil Brown [this message]
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=20101201110629.7d974f3d@notabene.brown \
--to=neilb@suse.de \
--cc=dan.j.williams@intel.com \
--cc=ed.ciechanowski@intel.com \
--cc=linux-raid@vger.kernel.org \
--cc=przemyslaw.hawrylewicz.czarnowski@intel.com \
/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;
as well as URLs for NNTP newsgroup(s).