Skip to content

Commit

Permalink
scsi: target: Write NULL to *port_nexus_ptr if no ISID
Browse files Browse the repository at this point in the history
This patch fixes a minor flaw that could be triggered by a PR OUT RESERVE
on iSCSI, if TRANSPORT IDs with and without ISID are used in the same
command.  In case an ISCSI Transport ID has no ISID, port_nexus_ptr was not
used to write NULL, so value from previous call might persist.  I don't
know if that ever could happen, but with the change the code is cleaner, I
think.

Link: https://lore.kernel.org/r/20200408132610.14623-2-bstroesser@ts.fujitsu.com
Signed-off-by: Bodo Stroesser <bstroesser@ts.fujitsu.com>
Reviewed-by: Mike Christie <mchristi@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
  • Loading branch information
Bodo Stroesser authored and Martin K. Petersen committed Apr 13, 2020
1 parent d6b23a7 commit 13ef143
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/target/target_core_fabric_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,8 @@ static char *iscsi_parse_pr_out_transport_id(
*p = tolower(*p);
p++;
}
}
} else
*port_nexus_ptr = NULL;

return &buf[4];
}
Expand Down

0 comments on commit 13ef143

Please sign in to comment.