Commit 37719c2a authored by Adheer Chandravanshi's avatar Adheer Chandravanshi Committed by James Bottomley

[SCSI] qla4xxx: Restrict logout from boot target session using session id

Signed-off-by: default avatarAdheer Chandravanshi <adheer.chandravanshi@qlogic.com>
Signed-off-by: default avatarVikas Chaudhary <vikas.chaudhary@qlogic.com>
Reviewed-by: default avatarMike Christie <michaelc@cs.wisc.edu>
Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
parent 039acc1e
......@@ -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__);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment