kernel_samsung_a53x/fs/notify
Amir Goldstein 79f5155462 fsnotify: fix sb_connectors leak
[ Upstream commit 4396a73115fc8739083536162e2228c0c0c3ed1a ]

Fix a leak in s_fsnotify_connectors counter in case of a race between
concurrent add of new fsnotify mark to an object.

The task that lost the race fails to drop the counter before freeing
the unused connector.

Following umount() hangs in fsnotify_sb_delete()/wait_var_event(),
because s_fsnotify_connectors never drops to zero.

Fixes: ec44610fe2b8 ("fsnotify: count all objects with attached connectors")
Reported-by: Murphy Zhou <jencce.kernel@gmail.com>
Link: https://lore.kernel.org/linux-fsdevel/20210907063338.ycaw6wvhzrfsfdlp@xzhoux.usersys.redhat.com/
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:45 +01:00
..
dnotify file: Rename fcheck lookup_fd_rcu 2024-11-19 12:27:27 +01:00
fanotify fanotify: add pidfd support to the fanotify API 2024-11-19 12:27:43 +01:00
inotify fsnotify: use hash table for faster events merge 2024-11-19 12:27:36 +01:00
fdinfo.c fanotify: fix permission model of unprivileged group 2024-11-19 12:27:37 +01:00
fdinfo.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fsnotify.c fsnotify: count all objects with attached connectors 2024-11-19 12:27:44 +01:00
fsnotify.h fsnotify: count all objects with attached connectors 2024-11-19 12:27:44 +01:00
group.c fanotify: configurable limits via sysfs 2024-11-19 12:27:37 +01:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mark.c fsnotify: fix sb_connectors leak 2024-11-19 12:27:45 +01:00
notification.c fsnotify: use hash table for faster events merge 2024-11-19 12:27:36 +01:00