Patch "fs: dlm: clear pending bit when queue was empty" has been added to the 6.4-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

    fs: dlm: clear pending bit when queue was empty

to the 6.4-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-clear-pending-bit-when-queue-was-empty.patch
and it can be found in the queue-6.4 subdirectory.

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


>From 7a931477bff1c7548aa8492bccf600f5f29452b1 Mon Sep 17 00:00:00 2001
From: Alexander Aring <aahringo@xxxxxxxxxx>
Date: Mon, 29 May 2023 17:44:30 -0400
Subject: fs: dlm: clear pending bit when queue was empty

From: Alexander Aring <aahringo@xxxxxxxxxx>

commit 7a931477bff1c7548aa8492bccf600f5f29452b1 upstream.

This patch clears the DLM_IFL_CB_PENDING_BIT flag which will be set when
there is callback work queued when there was no callback to dequeue. It
is a buggy case and should never happen, that's why there is a
WARN_ON(). However if the case happens we are prepared to somehow
recover from it.

Cc: stable@xxxxxxxxxxxxxxx
Fixes: 61bed0baa4db ("fs: dlm: use a non-static queue for callbacks")
Signed-off-by: Alexander Aring <aahringo@xxxxxxxxxx>
Signed-off-by: David Teigland <teigland@xxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 fs/dlm/ast.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/fs/dlm/ast.c b/fs/dlm/ast.c
index 700ff2e0515a..ff0ef4653535 100644
--- a/fs/dlm/ast.c
+++ b/fs/dlm/ast.c
@@ -181,10 +181,12 @@ void dlm_callback_work(struct work_struct *work)
 
 	spin_lock(&lkb->lkb_cb_lock);
 	rv = dlm_dequeue_lkb_callback(lkb, &cb);
-	spin_unlock(&lkb->lkb_cb_lock);
-
-	if (WARN_ON_ONCE(rv == DLM_DEQUEUE_CALLBACK_EMPTY))
+	if (WARN_ON_ONCE(rv == DLM_DEQUEUE_CALLBACK_EMPTY)) {
+		clear_bit(DLM_IFL_CB_PENDING_BIT, &lkb->lkb_iflags);
+		spin_unlock(&lkb->lkb_cb_lock);
 		goto out;
+	}
+	spin_unlock(&lkb->lkb_cb_lock);
 
 	for (;;) {
 		castfn = lkb->lkb_astfn;
-- 
2.41.0



Patches currently in stable-queue which might be from aahringo@xxxxxxxxxx are

queue-6.4/fs-dlm-return-positive-pid-value-for-f_getlk.patch
queue-6.4/fs-dlm-fix-cleanup-pending-ops-when-interrupted.patch
queue-6.4/fs-dlm-make-f_setlk-use-unkillable-wait_event.patch
queue-6.4/fs-dlm-revert-check-required-context-while-close.patch
queue-6.4/fs-dlm-fix-missing-pending-to-false.patch
queue-6.4/fs-dlm-fix-mismatch-of-plock-results-from-userspace.patch
queue-6.4/fs-dlm-clear-pending-bit-when-queue-was-empty.patch
queue-6.4/fs-dlm-interrupt-posix-locks-only-when-process-is-killed.patch



[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