From: Maurizio Lombardi <mlombard@redhat.com>
To: jayamohan.kallickal@avagotech.com
Cc: ketan.mukadam@avagotech.com, sony.john@avagotech.com,
linux-scsi@vger.kernel.org
Subject: [PATCH] be2iscsi: set the boot_kset pointer to NULL in case of failure
Date: Fri, 4 Mar 2016 10:41:49 +0100 [thread overview]
Message-ID: <1457084509-7368-1-git-send-email-mlombard@redhat.com> (raw)
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
next reply other threads:[~2016-03-04 9:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-04 9:41 Maurizio Lombardi [this message]
2016-03-04 11:36 ` [PATCH] be2iscsi: set the boot_kset pointer to NULL in case of failure 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1457084509-7368-1-git-send-email-mlombard@redhat.com \
--to=mlombard@redhat.com \
--cc=jayamohan.kallickal@avagotech.com \
--cc=ketan.mukadam@avagotech.com \
--cc=linux-scsi@vger.kernel.org \
--cc=sony.john@avagotech.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).