Commit 35bf020b authored by Yang Li's avatar Yang Li Committed by Martin K. Petersen

scsi: target: iscsi: Fix NULL pointer dereference in iscsi_conn_auth_required()

Fix following coccicheck error:

./drivers/target/iscsi/iscsi_target_nego.c:831:13-26: ERROR: se_nacl is NULL but dereferenced.

Link: https://lore.kernel.org/r/20220613014321.107045-1-yang.lee@linux.alibaba.com
Fixes: a75fcb09 ("scsi: target: iscsi: Extract auth functions")
Reported-by: default avatarAbaci Robot <abaci@linux.alibaba.com>
Reviewed-by: default avatarMike Christie <michael.christie@oracle.com>
Signed-off-by: default avatarYang Li <yang.lee@linux.alibaba.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 09c962fd
......@@ -827,8 +827,7 @@ static bool iscsi_conn_auth_required(struct iscsit_conn *conn)
*/
se_nacl = conn->sess->se_sess->se_node_acl;
if (!se_nacl) {
pr_debug("Unknown ACL %s is trying to connect\n",
se_nacl->initiatorname);
pr_debug("Unknown ACL is trying to connect\n");
return true;
}
......
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