No description
Find a file
Amir Goldstein 94a2646e3b fsnotify: fix fsnotify hooks in pseudo filesystems
commit 29044dae2e upstream.

Commit 49246466a9 ("fsnotify: move fsnotify_nameremove() hook out of
d_delete()") moved the fsnotify delete hook before d_delete() so fsnotify
will have access to a positive dentry.

This allowed a race where opening the deleted file via cached dentry
is now possible after receiving the IN_DELETE event.

To fix the regression in pseudo filesystems, convert d_delete() calls
to d_drop() (see commit 46c46f8df9 ("devpts_pty_kill(): don't bother
with d_delete()") and move the fsnotify hook after d_drop().

Add a missing fsnotify_unlink() hook in nfsdfs that was found during
the audit of fsnotify hooks in pseudo filesystems.

Note that the fsnotify hooks in simple_recursive_removal() follow
d_invalidate(), so they require no change.

Link: https://lore.kernel.org/r/20220120215305.282577-2-amir73il@gmail.com
Reported-by: Ivan Delalande <colona@arista.com>
Link: https://lore.kernel.org/linux-fsdevel/YeNyzoDM5hP5LtGW@visor/
Fixes: 49246466a9 ("fsnotify: move fsnotify_nameremove() hook out of d_delete()")
Cc: stable@vger.kernel.org # v5.3+
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-04-19 17:44:48 +08:00
arch powerpc/bpf: Update ldimm64 instructions during extra pass 2023-04-19 17:44:47 +08:00
block block: Fix fsync always failed if once failed 2023-04-19 17:44:38 +08:00
certs certs: Add support for using elliptic curve keys for signing modules 2021-08-23 19:55:42 +03:00
crypto crypto: jitter - consider 32 LSB for APT 2023-04-19 17:44:20 +08:00
Documentation dt-bindings: watchdog: Require samsung,syscon-phandle for Exynos7 2023-04-19 17:44:44 +08:00
drivers efi: runtime: avoid EFIv2 runtime services on Apple x86 machines 2023-04-19 17:44:47 +08:00
fs fsnotify: fix fsnotify hooks in pseudo filesystems 2023-04-19 17:44:48 +08:00
include net_sched: restore "mpu xxx" handling 2023-04-19 17:44:44 +08:00
init init: make unknown command line param message clearer 2023-04-19 16:57:51 +08:00
ipc shm: extend forced shm destroy to support objects from several IPC nses 2023-04-19 17:42:16 +08:00
kernel tracing: Don't inc err_log entry count if entry allocation fails 2023-04-19 17:44:48 +08:00
lib lib/test_meminit: destroy cache in kmem_cache_alloc_bulk() test 2023-04-19 17:44:45 +08:00
LICENSES LICENSES/dual/CC-BY-4.0: Git rid of "smart quotes" 2021-07-15 06:31:24 -06:00
mm memcg: better bounds on the memcg stats updates 2023-04-19 17:44:46 +08:00
net fsnotify: fix fsnotify hooks in pseudo filesystems 2023-04-19 17:44:48 +08:00
samples samples: bpf: Fix 'unknown warning group' build warning on Clang 2023-04-19 17:43:59 +08:00
scripts scripts: sphinx-pre-install: Fix ctex support on Debian 2023-04-19 17:44:45 +08:00
security selinux: fix potential memleak in selinux_add_opt() 2023-04-19 17:44:04 +08:00
sound ASoC: mediatek: mt8183: fix device_node leak 2023-04-19 17:44:31 +08:00
tools mm/hmm.c: allow VM_MIXEDMAP to work with hmm_range_fault 2023-04-19 17:44:45 +08:00
usr [board]:Init board config for JH7110 2021-11-18 14:06:27 +08:00
virt KVM: downgrade two BUG_ONs to WARN_ON_ONCE 2023-04-19 17:43:06 +08:00
.clang-format clang-format: Update with the latest for_each macro list 2021-05-12 23:32:39 +02:00
.cocciconfig
.get_maintainer.ignore Opt out of scripts/get_maintainer.pl 2019-05-16 10:53:40 -07:00
.gitattributes .gitattributes: use 'dts' diff driver for dts files 2019-12-04 19:44:11 -08:00
.gitignore .gitignore: ignore only top-level modules.builtin 2021-05-02 00:43:35 +09:00
.mailmap mailmap: add Andrej Shadura 2021-10-18 20:22:03 -10:00
COPYING COPYING: state that all contributions really are covered by this file 2020-02-10 13:32:20 -08:00
CREDITS MAINTAINERS: Move Daniel Drake to credits 2021-09-21 08:34:58 +03:00
Kbuild kbuild: rename hostprogs-y/always to hostprogs/always-y 2020-02-04 01:53:07 +09:00
Kconfig kbuild: ensure full rebuild when the compiler is updated 2020-05-12 13:28:33 +09:00
MAINTAINERS MAINTAINERS: Add entry for RISC-V PMU drivers 2023-01-03 14:26:18 +08:00
Makefile Linux 5.15.18 2023-04-19 17:44:46 +08:00
README Drop all 00-INDEX files from Documentation/ 2018-09-09 15:08:58 -06:00

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.