Skip to content

Commit b2b1d52

Browse files
committed
scsi: iscsi: Fix redundant response for ISCSI_UEVENT_GET_HOST_STATS request
JIRA: https://issues.redhat.com/browse/RHEL-90552 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@gmail.com> Link: https://lore.kernel.org/r/20250107022432.65390-1-hawkxiang.cpp@gmail.com Reviewed-by: Mike Christie <michael.christie@oracle.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> (cherry picked from commit 63ca022) Signed-off-by: Chris Leech <cleech@redhat.com>
1 parent 6ee269a commit b2b1d52

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/scsi/scsi_transport_iscsi.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4077,7 +4077,7 @@ iscsi_if_rx(struct sk_buff *skb)
40774077
}
40784078
do {
40794079
/*
4080-
* special case for GET_STATS:
4080+
* special case for GET_STATS, GET_CHAP and GET_HOST_STATS:
40814081
* on success - sending reply and stats from
40824082
* inside of if_recv_msg(),
40834083
* on error - fall through.
@@ -4086,6 +4086,8 @@ iscsi_if_rx(struct sk_buff *skb)
40864086
break;
40874087
if (ev->type == ISCSI_UEVENT_GET_CHAP && !err)
40884088
break;
4089+
if (ev->type == ISCSI_UEVENT_GET_HOST_STATS && !err)
4090+
break;
40894091
err = iscsi_if_send_reply(portid, nlh->nlmsg_type,
40904092
ev, sizeof(*ev));
40914093
if (err == -EAGAIN && --retries < 0) {

0 commit comments

Comments
 (0)