* [PATCH] fix: incremental on invalid container causes segfault
@ 2010-12-06 6:40 Hawrylewicz Czarnowski, Przemyslaw
2010-12-07 10:02 ` Neil Brown
0 siblings, 1 reply; 2+ messages in thread
From: Hawrylewicz Czarnowski, Przemyslaw @ 2010-12-06 6:40 UTC (permalink / raw)
To: Neil Brown
Cc: linux-raid@vger.kernel.org, Williams, Dan J, Ciechanowski, Ed,
Labun, Marcin, Czarnowska, Anna
counterpart of 417f346ee0 for incremental.
If md device has metadata_version="none" super_by_fd() matches supertype=super0.
Call of load_container() dereferences null, so we have to forbid it.
Signed-off-by: Przemyslaw Czarnowski <przemyslaw.hawrylewicz.czarnowski@intel.com>
---
Incremental.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Incremental.c b/Incremental.c
index 8cae1ee..9399f5b 100644
--- a/Incremental.c
+++ b/Incremental.c
@@ -134,7 +134,7 @@ int Incremental(char *devname, int verbose, int runstop,
if (must_be_container(dfd)) {
if (!st)
st = super_by_fd(dfd, NULL);
- if (st)
+ if (st && st->ss->load_container)
rv = st->ss->load_container(st, dfd, NULL);
close(dfd);
--
1.7.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] fix: incremental on invalid container causes segfault
2010-12-06 6:40 [PATCH] fix: incremental on invalid container causes segfault Hawrylewicz Czarnowski, Przemyslaw
@ 2010-12-07 10:02 ` Neil Brown
0 siblings, 0 replies; 2+ messages in thread
From: Neil Brown @ 2010-12-07 10:02 UTC (permalink / raw)
To: Hawrylewicz Czarnowski, Przemyslaw
Cc: linux-raid@vger.kernel.org, Williams, Dan J, Ciechanowski, Ed,
Labun, Marcin, Czarnowska, Anna
On Mon, 6 Dec 2010 06:40:40 +0000 "Hawrylewicz Czarnowski, Przemyslaw"
<przemyslaw.hawrylewicz.czarnowski@intel.com> wrote:
> counterpart of 417f346ee0 for incremental.
> If md device has metadata_version="none" super_by_fd() matches supertype=super0.
> Call of load_container() dereferences null, so we have to forbid it.
>
> Signed-off-by: Przemyslaw Czarnowski <przemyslaw.hawrylewicz.czarnowski@intel.com>
> ---
> Incremental.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/Incremental.c b/Incremental.c
> index 8cae1ee..9399f5b 100644
> --- a/Incremental.c
> +++ b/Incremental.c
> @@ -134,7 +134,7 @@ int Incremental(char *devname, int verbose, int runstop,
> if (must_be_container(dfd)) {
> if (!st)
> st = super_by_fd(dfd, NULL);
> - if (st)
> + if (st && st->ss->load_container)
> rv = st->ss->load_container(st, dfd, NULL);
>
> close(dfd);
Thanks. Applied.
NeilBrown
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-12-07 10:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-06 6:40 [PATCH] fix: incremental on invalid container causes segfault Hawrylewicz Czarnowski, Przemyslaw
2010-12-07 10:02 ` Neil Brown
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).