Skip to contentSkip to conversation

Patch "megaraid: fix null pointer check in megasas_detach_one()." has been added to the 4.4-stable tree

PATCH [email protected] 1 participant 1 message Sep 26, 2016

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

megaraid: fix null pointer check in megasas_detach_one().

to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
megaraid-fix-null-pointer-check-in-megasas_detach_one.patch
and it can be found in the queue-4.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From 546e559c79b1a8d27c23262907a00fc209e392a0 Mon Sep 17 00:00:00 2001

From: Maurizio Lombardi <[email protected]>
Date: Fri, 22 Jan 2016 13:41:42 +0100
Subject: megaraid: fix null pointer check in megasas_detach_one().

From: Maurizio Lombardi <[email protected]>

commit 546e559c79b1a8d27c23262907a00fc209e392a0 upstream.

The pd_seq_sync pointer can't be NULL, we have to check its entries instead.

---
 drivers/scsi/megaraid/megaraid_sas_base.c |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/scsi/megaraid/megaraid_sas_base.c +5 -5
@@ -5941,11 +5941,11 @@ static void megasas_detach_one(struct pc
 			if (fusion->ld_drv_map[i])
 				free_pages((ulong)fusion->ld_drv_map[i],
 					fusion->drv_map_pages);
-				if (fusion->pd_seq_sync)
-					dma_free_coherent(&instance->pdev->dev,
-						pd_seq_map_sz,
-						fusion->pd_seq_sync[i],
-						fusion->pd_seq_phys[i]);
+			if (fusion->pd_seq_sync[i])
+				dma_free_coherent(&instance->pdev->dev,
+					pd_seq_map_sz,
+					fusion->pd_seq_sync[i],
+					fusion->pd_seq_phys[i]);
 		}
 		free_pages((ulong)instance->ctrl_context,
 			instance->ctrl_context_pages);

Patches currently in stable-queue which might be from [email protected] are

queue-4.4/megaraid-fix-null-pointer-check-in-megasas_detach_one.patch