Patch "splice: fsnotify_access(fd)/fsnotify_modify(fd) in vmsplice" has been added to the 6.5-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

    splice: fsnotify_access(fd)/fsnotify_modify(fd) in vmsplice

to the 6.5-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:
     splice-fsnotify_access-fd-fsnotify_modify-fd-in-vmsp.patch
and it can be found in the queue-6.5 subdirectory.

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



commit 386a00eec7fa4b7058d3bbf443fa07a41ae64759
Author: Ahelenia Ziemiańska <nabijaczleweli@xxxxxxxxxxxxxxxxxx>
Date:   Mon Jul 3 16:42:17 2023 +0200

    splice: fsnotify_access(fd)/fsnotify_modify(fd) in vmsplice
    
    [ Upstream commit 7f0f1ea069e52d5a16921abd59377a7da6c25149 ]
    
    Same logic applies here: this can fill up the pipe and pollers that rely
    on getting IN_MODIFY notifications never wake up.
    
    Fixes: 983652c69199 ("splice: report related fsnotify events")
    Link: https://lore.kernel.org/linux-fsdevel/jbyihkyk5dtaohdwjyivambb2gffyjs3dodpofafnkkunxq7bu@jngkdxx65pux/t/#u
    Link: https://bugs.debian.org/1039488
    Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@xxxxxxxxxxxxxxxxxx>
    Acked-by: Jan Kara <jack@xxxxxxx>
    Reviewed-by: Amir Goldstein <amir73il@xxxxxxxxx>
    Message-Id: <8d9ad5acb9c5c1dd2376a2ff5da6ac3183115389.1688393619.git.nabijaczleweli@xxxxxxxxxxxxxxxxxx>
    Signed-off-by: Christian Brauner <brauner@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/fs/splice.c b/fs/splice.c
index 53831eb0fefa8..5f38d921dc074 100644
--- a/fs/splice.c
+++ b/fs/splice.c
@@ -1462,6 +1462,9 @@ static long vmsplice_to_user(struct file *file, struct iov_iter *iter,
 		pipe_unlock(pipe);
 	}
 
+	if (ret > 0)
+		fsnotify_access(file);
+
 	return ret;
 }
 
@@ -1491,8 +1494,10 @@ static long vmsplice_to_pipe(struct file *file, struct iov_iter *iter,
 	if (!ret)
 		ret = iter_to_pipe(iter, pipe, buf_flag);
 	pipe_unlock(pipe);
-	if (ret > 0)
+	if (ret > 0) {
 		wakeup_pipe_readers(pipe);
+		fsnotify_modify(file);
+	}
 	return ret;
 }
 



[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