diff options
Diffstat (limited to 'drivers/target/iscsi/iscsi_target_nego.c')
-rw-r--r-- | drivers/target/iscsi/iscsi_target_nego.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/target/iscsi/iscsi_target_nego.c b/drivers/target/iscsi/iscsi_target_nego.c index 151e2949bb75..c0ed6f8e5c5b 100644 --- a/drivers/target/iscsi/iscsi_target_nego.c +++ b/drivers/target/iscsi/iscsi_target_nego.c @@ -118,13 +118,6 @@ static u32 iscsi_handle_authentication( " CHAP auth\n"); return -1; } - iscsi_nacl = container_of(se_nacl, struct iscsi_node_acl, - se_node_acl); - if (!iscsi_nacl) { - pr_err("Unable to locate struct iscsi_node_acl for" - " CHAP auth\n"); - return -1; - } if (se_nacl->dynamic_node_acl) { iscsi_tpg = container_of(se_nacl->se_tpg, @@ -1082,14 +1075,12 @@ int iscsi_target_locate_portal( login_req = (struct iscsi_login_req *) login->req; payload_length = ntoh24(login_req->dlength); - tmpbuf = kzalloc(payload_length + 1, GFP_KERNEL); + tmpbuf = kmemdup_nul(login->req_buf, payload_length, GFP_KERNEL); if (!tmpbuf) { pr_err("Unable to allocate memory for tmpbuf.\n"); return -1; } - memcpy(tmpbuf, login->req_buf, payload_length); - tmpbuf[payload_length] = '\0'; start = tmpbuf; end = (start + payload_length); |