linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: vikas.chaudhary@qlogic.com
To: jbottomley@parallels.com, michaelc@cs.wisc.edu
Cc: linux-scsi@vger.kernel.org, vikas.chaudhary@qlogic.com,
	lalit.chandivade@qlogic.com, ravi.anand@qlogic.com,
	Adheer Chandravanshi <adheer.chandravanshi@qlogic.com>
Subject: [PATCH 2/5] qla4xxx: Restrict logout from boot target session using session id
Date: Fri,  5 Apr 2013 07:06:07 -0400	[thread overview]
Message-ID: <1365159970-17672-3-git-send-email-vikas.chaudhary@qlogic.com> (raw)
In-Reply-To: <1365159970-17672-1-git-send-email-vikas.chaudhary@qlogic.com>

From: Adheer Chandravanshi <adheer.chandravanshi@qlogic.com>

Signed-off-by: Adheer Chandravanshi <adheer.chandravanshi@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
---
 drivers/scsi/qla4xxx/ql4_os.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c
index 5f7a2bc..f82efcb 100644
--- a/drivers/scsi/qla4xxx/ql4_os.c
+++ b/drivers/scsi/qla4xxx/ql4_os.c
@@ -5916,6 +5916,14 @@ static int qla4xxx_sysfs_ddb_logout_sid(struct iscsi_cls_session *cls_sess)
 		goto exit_ddb_logout;
 	}
 
+	if (test_bit(DF_BOOT_TGT, &ddb_entry->flags)) {
+		ql4_printk(KERN_ERR, ha,
+			   "%s: Logout from boot target entry is not permitted.\n",
+			   __func__);
+		ret = -EPERM;
+		goto exit_ddb_logout;
+	}
+
 	options = LOGOUT_OPTION_CLOSE_SESSION;
 	if (qla4xxx_session_logout_ddb(ha, ddb_entry, options) == QLA_ERROR) {
 		ql4_printk(KERN_ERR, ha, "%s: Logout failed\n", __func__);
-- 
1.8.2.GIT


  parent reply	other threads:[~2013-04-05 11:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-05 11:06 [PATCH 0/5] qla4xxx: Updates for scsi "misc" branch vikas.chaudhary
2013-04-05 11:06 ` [PATCH 1/5] qla4xxx: Use correct flash ddb offset for ISP40XX vikas.chaudhary
2013-04-05 11:06 ` vikas.chaudhary [this message]
2013-04-05 11:06 ` [PATCH 3/5] qla4xxx: Use correct value for max flash node entries vikas.chaudhary
2013-04-05 11:06 ` [PATCH 4/5] qla4xxx: Added print statements to display AENs vikas.chaudhary
2013-04-05 11:06 ` [PATCH 5/5] qla4xxx: Update driver version to 5.03.00-k8 vikas.chaudhary
2013-04-10 15:47 ` [PATCH 0/5] qla4xxx: Updates for scsi "misc" branch Mike Christie

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=1365159970-17672-3-git-send-email-vikas.chaudhary@qlogic.com \
    --to=vikas.chaudhary@qlogic.com \
    --cc=adheer.chandravanshi@qlogic.com \
    --cc=jbottomley@parallels.com \
    --cc=lalit.chandivade@qlogic.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=michaelc@cs.wisc.edu \
    --cc=ravi.anand@qlogic.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).