1 Dec 2010 01:06
Re: [PATCH] fix: assemble for external metadata generates segfault if invalid device found
Neil Brown <neilb <at> suse.de>
2010-12-01 00:06:29 GMT
2010-12-01 00:06:29 GMT
On Tue, 30 Nov 2010 23:49:52 +0000 "Hawrylewicz Czarnowski, Przemyslaw"
<przemyslaw.hawrylewicz.czarnowski <at> 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 <at> 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
> <at> <at> -332,7 +332,7 <at> <at> 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)
(Continue reading)
RSS Feed