Skip to content

Commit 13ef143

Browse files
BStroessermartinkpetersen
authored andcommitted
scsi: target: Write NULL to *port_nexus_ptr if no ISID
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/[email protected] Signed-off-by: Bodo Stroesser <[email protected]> Reviewed-by: Mike Christie <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent d6b23a7 commit 13ef143

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/target/target_core_fabric_lib.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,8 @@ static char *iscsi_parse_pr_out_transport_id(
341341
*p = tolower(*p);
342342
p++;
343343
}
344-
}
344+
} else
345+
*port_nexus_ptr = NULL;
345346

346347
return &buf[4];
347348
}

0 commit comments

Comments
 (0)