[PATCH 3.19.y-ckt 075/170] be2iscsi: set the boot_kset pointer to NULL in case of failure
Kamal Mostafa
kamal at canonical.com
Sat Apr 2 00:52:41 UTC 2016
3.19.8-ckt18 -stable review patch. If anyone has any objections, please let me know.
---8<------------------------------------------------------------
From: Maurizio Lombardi <mlombard at redhat.com>
commit 84bd64993f916bcf86270c67686ecf4cea7b8933 upstream.
In beiscsi_setup_boot_info(), the boot_kset pointer should be set to
NULL in case of failure otherwise an invalid pointer dereference may
occur later.
Signed-off-by: Maurizio Lombardi <mlombard at redhat.com>
Reviewed-by: Johannes Thumshirn <jthumshirn at suse.de>
Reviewed-by: Jitendra Bhivare <jitendra.bhivare at broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen at oracle.com>
Signed-off-by: Kamal Mostafa <kamal at canonical.com>
---
drivers/scsi/be2iscsi/be_main.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c
index 7a56f44..002a45d 100644
--- a/drivers/scsi/be2iscsi/be_main.c
+++ b/drivers/scsi/be2iscsi/be_main.c
@@ -4435,6 +4435,7 @@ put_shost:
scsi_host_put(phba->shost);
free_kset:
iscsi_boot_destroy_kset(phba->boot_kset);
+ phba->boot_kset = NULL;
return -ENOMEM;
}
--
2.7.4
More information about the kernel-team
mailing list