linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] be2iscsi: set the boot_kset pointer to NULL in case of failure
@ 2016-03-04  9:41 Maurizio Lombardi
  2016-03-04 11:36 ` Johannes Thumshirn
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Maurizio Lombardi @ 2016-03-04  9:41 UTC (permalink / raw)
  To: jayamohan.kallickal; +Cc: ketan.mukadam, sony.john, linux-scsi

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@redhat.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 cb9072a..069e5c5 100644
--- a/drivers/scsi/be2iscsi/be_main.c
+++ b/drivers/scsi/be2iscsi/be_main.c
@@ -4468,6 +4468,7 @@ put_shost:
 	scsi_host_put(phba->shost);
 free_kset:
 	iscsi_boot_destroy_kset(phba->boot_kset);
+	phba->boot_kset = NULL;
 	return -ENOMEM;
 }
 
-- 
Maurizio Lombardi


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-03-09  1:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-04  9:41 [PATCH] be2iscsi: set the boot_kset pointer to NULL in case of failure Maurizio Lombardi
2016-03-04 11:36 ` Johannes Thumshirn
2016-03-07  2:26 ` Jitendra Bhivare
2016-03-08  2:03 ` Martin K. Petersen
2016-03-08 10:28   ` Maurizio Lombardi
2016-03-09  1:52 ` Martin K. Petersen

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).