Patch "fuse: set FR_PENDING atomically in fuse_resend()" has been added to the 6.9-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

    fuse: set FR_PENDING atomically in fuse_resend()

to the 6.9-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:
     fuse-set-fr_pending-atomically-in-fuse_resend.patch
and it can be found in the queue-6.9 subdirectory.

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



commit 96528e3f19adce72fecfbff937acf4011f2e2c63
Author: Hou Tao <houtao1@xxxxxxxxxx>
Date:   Thu May 9 20:21:53 2024 +0800

    fuse: set FR_PENDING atomically in fuse_resend()
    
    [ Upstream commit 42815f8ac54c5113bf450ec4b7ccc5b62af0f6a7 ]
    
    When fuse_resend() moves the requests from processing lists to pending
    list, it uses __set_bit() to set FR_PENDING bit in req->flags.
    
    Using __set_bit() is not safe, because other functions may update
    req->flags concurrently (e.g., request_wait_answer() may call
    set_bit(FR_INTERRUPTED, &flags)).
    
    Fix it by using set_bit() instead.
    
    Fixes: 760eac73f9f6 ("fuse: Introduce a new notification type for resend pending requests")
    Signed-off-by: Hou Tao <houtao1@xxxxxxxxxx>
    Signed-off-by: Miklos Szeredi <mszeredi@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c
index 3ec8bb5e68ff5..8eb2ce7c0b012 100644
--- a/fs/fuse/dev.c
+++ b/fs/fuse/dev.c
@@ -1813,7 +1813,7 @@ static void fuse_resend(struct fuse_conn *fc)
 	spin_unlock(&fc->lock);
 
 	list_for_each_entry_safe(req, next, &to_queue, list) {
-		__set_bit(FR_PENDING, &req->flags);
+		set_bit(FR_PENDING, &req->flags);
 		/* mark the request as resend request */
 		req->in.h.unique |= FUSE_UNIQUE_RESEND;
 	}




[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