Files
ack-tegra/include/linux
Amir Goldstein 955fbe0ef1 Revert "fsnotify: generate pre-content permission event on page fault"
This reverts commit 8392bc2ff8.

In the use case of buffered write whose input buffer is mmapped file on a
filesystem with a pre-content mark, the prefaulting of the buffer can
happen under the filesystem freeze protection (obtained in vfs_write())
which breaks assumptions of pre-content hook and introduces potential
deadlock of HSM handler in userspace with filesystem freezing.

Now that we have pre-content hooks at file mmap() time, disable the
pre-content event hooks on page fault to avoid the potential deadlock.

Reported-by: syzbot+7229071b47908b19d5b7@syzkaller.appspotmail.com
Closes: https://lore.kernel.org/linux-fsdevel/7ehxrhbvehlrjwvrduoxsao5k3x4aw275patsb3krkwuq573yv@o2hskrfawbnc/
Fixes: 8392bc2ff8 ("fsnotify: generate pre-content permission event on page fault")
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Link: https://patch.msgid.link/20250312073852.2123409-5-amir73il@gmail.com
2025-03-13 16:30:55 +01:00
..
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2025-01-04 15:27:35 -07:00
…
2025-03-06 17:50:55 -07:00
…
…
…
…
…
…
…
…
…
…
…
…
…
2025-01-06 07:36:39 -07:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2024-12-02 12:01:43 +01:00
…
…
…
…
…
…
…
…
2025-01-18 12:33:39 -08:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2024-12-17 09:16:11 +01:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2025-01-25 20:22:31 -08:00
…
…
…
…
…
…
…
…
…
2024-11-28 14:49:28 +01:00
2025-01-09 10:06:14 +01:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2025-01-07 18:06:51 -08:00
…
…
…
…
…
…
…
…
…
…
…
…
2024-12-18 09:39:37 +01:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2025-01-25 08:22:26 +00:00
…
…
…
…
…
…
…
…
…
…
…
…
2025-01-14 19:45:35 +01:00
…
…
2024-12-13 08:49:31 -07:00
…
…
…
2024-12-09 13:48:23 -08:00
2025-02-04 11:27:45 -05:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2025-01-15 15:07:23 -08:00
…
…
…
…
…
…
…
…
…
…
…
…
2025-02-25 15:07:24 -05:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2025-01-25 20:22:42 -08:00
…
…
…
…
…
…
…
2025-02-10 09:22:32 +01:00
…
…
…
…
…
…
…
…
…
…
2025-01-16 17:22:59 -08:00
2024-12-22 11:03:10 +01:00
…
…
…
…
…
…
…
…
2025-01-10 11:59:00 +01:00
2025-01-07 15:16:48 +01:00
…
…
…
…
…
…
…
…
2025-01-02 10:37:14 -06:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2024-12-09 14:44:59 -08:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2025-01-08 14:50:11 -08:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2024-12-19 19:51:13 -08:00
2025-01-29 13:32:23 -08:00
2025-01-11 20:39:43 +01:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2025-01-29 09:04:28 -08:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2024-12-23 08:17:16 -07:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2024-12-09 14:44:59 -08:00
…
…
…
…
…
…
…
…
…
…
…
…