]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: target: fix PR IN / READ FULL STATUS for FC
authorBodo Stroesser <bstroesser@ts.fujitsu.com>
Wed, 8 Apr 2020 13:26:10 +0000 (15:26 +0200)
committerMartin K. Petersen <martin.petersen@oracle.com>
Mon, 13 Apr 2020 18:00:41 +0000 (14:00 -0400)
commit5b5775e9dff4a7849f95eaacfefd5c118122aba6
tree220c1de30de506a07256a6a80e49c239e83c378c
parent3220c7960a65a797a417e1138a1268c660c229e6
scsi: target: fix PR IN / READ FULL STATUS for FC

Creation of the response to READ FULL STATUS fails for FC based
reservations. Reason is the too high loop limit (< 24) in
fc_get_pr_transport_id(). The string representation of FC WWPN is 23 chars
long only ("11:22:33:44:55:66:77:88"). So when i is 23, the loop body is
executed a last time for the ending '\0' of the string and thus hex2bin()
reports an error.

Link: https://lore.kernel.org/r/20200408132610.14623-3-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>
drivers/target/target_core_fabric_lib.c