This is a note to let you know that I've just added the patch titled fs: dlm: don't set stop rx flag after node reset to the 5.15-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: fs-dlm-don-t-set-stop-rx-flag-after-node-reset.patch and it can be found in the queue-5.15 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 15c63db8e86a72e0d5cfb9bf0cd1870e39a3e5fe Mon Sep 17 00:00:00 2001 From: Alexander Aring <aahringo@xxxxxxxxxx> Date: Thu, 12 Jan 2023 17:10:35 -0500 Subject: fs: dlm: don't set stop rx flag after node reset From: Alexander Aring <aahringo@xxxxxxxxxx> commit 15c63db8e86a72e0d5cfb9bf0cd1870e39a3e5fe upstream. Similar to the stop tx flag, the rx flag should warn about a dlm message being received at DLM_FIN state change, when we are assuming no other dlm application messages. If we receive a FIN message and we are in the state DLM_FIN_WAIT2 we call midcomms_node_reset() which puts the midcomms node into DLM_CLOSED state. Afterwards we should not set the DLM_NODE_FLAG_STOP_RX flag any more. This patch changes the setting DLM_NODE_FLAG_STOP_RX in those state changes when we receive a FIN message and we assume there will be no other dlm application messages received until we hit DLM_CLOSED state. Cc: stable@xxxxxxxxxxxxxxx Fixes: 489d8e559c65 ("fs: dlm: add reliable connection if reconnect") Signed-off-by: Alexander Aring <aahringo@xxxxxxxxxx> Signed-off-by: David Teigland <teigland@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- fs/dlm/midcomms.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) --- a/fs/dlm/midcomms.c +++ b/fs/dlm/midcomms.c @@ -504,6 +504,7 @@ static void dlm_midcomms_receive_buffer( break; case DLM_FIN_WAIT1: node->state = DLM_CLOSING; + set_bit(DLM_NODE_FLAG_STOP_RX, &node->flags); pr_debug("switch node %d to state %s\n", node->nodeid, dlm_state_str(node->state)); break; @@ -524,8 +525,6 @@ static void dlm_midcomms_receive_buffer( return; } spin_unlock(&node->state_lock); - - set_bit(DLM_NODE_FLAG_STOP_RX, &node->flags); break; default: WARN_ON(test_bit(DLM_NODE_FLAG_STOP_RX, &node->flags)); Patches currently in stable-queue which might be from aahringo@xxxxxxxxxx are queue-5.15/fs-dlm-send-fin-ack-back-in-right-cases.patch queue-5.15/fs-dlm-move-sending-fin-message-into-state-change-handling.patch queue-5.15/fs-dlm-don-t-set-stop-rx-flag-after-node-reset.patch