[PATCH 09/12] unblock_monitor(): Check sra is valid before dereferencing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Jes Sorensen <Jes.Sorensen@xxxxxxxxxx>

Signed-off-by: Jes Sorensen <Jes.Sorensen@xxxxxxxxxx>
---
 msg.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/msg.c b/msg.c
index 87d3b8d..dc780b3 100644
--- a/msg.c
+++ b/msg.c
@@ -448,6 +448,8 @@ void unblock_monitor(char *container, const int unfreeze)
 			continue;
 		sysfs_free(sra);
 		sra = sysfs_read(-1, e->devnum, GET_VERSION|GET_LEVEL);
+		if (!sra)
+			continue;
 		if (sra->array.level > 0)
 			to_ping++;
 		if (unblock_subarray(sra, unfreeze))
-- 
1.7.6.4

--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux