mdadm/mdadm-3.2.3-avoid-double-free-upon-old-buggy-kernel-sysfs_read-f.patch
Jes Sorensen e2bea3e210 Fix a double free and a segfault bug
Fix double free on buggy old kernel sysfs read
Fix segfault if trying to write superblock to non existing device
Resolves: bz795707 (f17) bz795747 (f16) bz795748 (f15)
Resolves: bz795461 (f17) bz795749 (f16) bz795750 (f15)

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
2012-02-23 11:19:49 +01:00

32 lines
995 B
Diff

From 9200d418d049aff77b3d0ad8f30f1a16adc56030 Mon Sep 17 00:00:00 2001
From: Jim Meyering <jim@meyering.net>
Date: Tue, 21 Feb 2012 13:02:22 +0100
Subject: [PATCH 1/2] avoid double-free upon "old buggy kernel" sysfs_read
failure
* Incremental.c (Incremental): On sysfs_read failure, don't call
sysfs_free(sra) just before "goto out_unlock", since that very
same "sra" is freed the same way by the clean-up code below.
Signed-off-by: Jim Meyering <meyering@redhat.com>
Signed-off-by: NeilBrown <neilb@suse.de>
---
Incremental.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/Incremental.c b/Incremental.c
index b457bf3..836a6f1 100644
--- a/Incremental.c
+++ b/Incremental.c
@@ -325,7 +325,6 @@ int Incremental(char *devname, int verbose, int runstop,
fprintf(stderr, Name
": You have an old buggy kernel which cannot support\n"
" --incremental reliably. Aborting.\n");
- sysfs_free(sra);
rv = 2;
goto out_unlock;
}
--
1.7.7.6