Patch "scsi: target: fix PR IN / READ FULL STATUS for FC" has been added to the 4.19-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    scsi: target: fix PR IN / READ FULL STATUS for FC

to the 4.19-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     scsi-target-fix-pr-in-read-full-status-for-fc.patch
and it can be found in the queue-4.19 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 037eed050d88ee1b692f291f12ae602587bc0d87
Author: Bodo Stroesser <bstroesser@xxxxxxxxxxxxxx>
Date:   Wed Apr 8 15:26:10 2020 +0200

    scsi: target: fix PR IN / READ FULL STATUS for FC
    
    [ Upstream commit 8fed04eb79a74cbf471dfaa755900a51b37273ab ]
    
    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@xxxxxxxxxxxxxx
    Signed-off-by: Bodo Stroesser <bstroesser@xxxxxxxxxxxxxx>
    Reviewed-by: Mike Christie <mchristi@xxxxxxxxxx>
    Signed-off-by: Martin K. Petersen <martin.petersen@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/target/target_core_fabric_lib.c b/drivers/target/target_core_fabric_lib.c
index 10fae26b44add..939c6212d2ac5 100644
--- a/drivers/target/target_core_fabric_lib.c
+++ b/drivers/target/target_core_fabric_lib.c
@@ -76,7 +76,7 @@ static int fc_get_pr_transport_id(
 	 * encoded TransportID.
 	 */
 	ptr = &se_nacl->initiatorname[0];
-	for (i = 0; i < 24; ) {
+	for (i = 0; i < 23; ) {
 		if (!strncmp(&ptr[i], ":", 1)) {
 			i++;
 			continue;



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux