Patch "scsi: iscsi: Fix redundant response for ISCSI_UEVENT_GET_HOST_STATS request" has been added to the 6.1-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: iscsi: Fix redundant response for ISCSI_UEVENT_GET_HOST_STATS request

to the 6.1-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-iscsi-fix-redundant-response-for-iscsi_uevent_g.patch
and it can be found in the queue-6.1 subdirectory.

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



commit 4c32af2cf6048a3fd8ad3106cef2a13fdb69ba97
Author: Xiang Zhang <hawkxiang.cpp@xxxxxxxxx>
Date:   Tue Jan 7 10:24:31 2025 +0800

    scsi: iscsi: Fix redundant response for ISCSI_UEVENT_GET_HOST_STATS request
    
    [ Upstream commit 63ca02221cc5aa0731fe2b0cc28158aaa4b84982 ]
    
    The ISCSI_UEVENT_GET_HOST_STATS request is already handled in
    iscsi_get_host_stats(). This fix ensures that redundant responses are
    skipped in iscsi_if_rx().
    
     - On success: send reply and stats from iscsi_get_host_stats()
       within if_recv_msg().
    
     - On error: fall through.
    
    Signed-off-by: Xiang Zhang <hawkxiang.cpp@xxxxxxxxx>
    Link: https://lore.kernel.org/r/20250107022432.65390-1-hawkxiang.cpp@xxxxxxxxx
    Reviewed-by: Mike Christie <michael.christie@xxxxxxxxxx>
    Signed-off-by: Martin K. Petersen <martin.petersen@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/scsi/scsi_transport_iscsi.c b/drivers/scsi/scsi_transport_iscsi.c
index 49dbcd67579aa..687487ea4fd3b 100644
--- a/drivers/scsi/scsi_transport_iscsi.c
+++ b/drivers/scsi/scsi_transport_iscsi.c
@@ -4102,7 +4102,7 @@ iscsi_if_rx(struct sk_buff *skb)
 		}
 		do {
 			/*
-			 * special case for GET_STATS:
+			 * special case for GET_STATS, GET_CHAP and GET_HOST_STATS:
 			 * on success - sending reply and stats from
 			 * inside of if_recv_msg(),
 			 * on error - fall through.
@@ -4111,6 +4111,8 @@ iscsi_if_rx(struct sk_buff *skb)
 				break;
 			if (ev->type == ISCSI_UEVENT_GET_CHAP && !err)
 				break;
+			if (ev->type == ISCSI_UEVENT_GET_HOST_STATS && !err)
+				break;
 			err = iscsi_if_send_reply(portid, nlh->nlmsg_type,
 						  ev, sizeof(*ev));
 			if (err == -EAGAIN && --retries < 0) {




[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