epoll: Keep a reference on files added to the check list
When adding a new fd to an epoll, and that this new fd is an epoll fd itself, we recursively scan the fds attached to it to detect cycles, and add non-epool files to a "check list" that gets subsequently parsed. However, this check list isn't completely safe when deletions can happen concurrently. To sidestep the issue, make sure that a struct file placed on the check list sees its f_count increased, ensuring that a concurrent deletion won't result in the file disapearing from under our feet. Cc: stable@vger.kernel.org Signed-off-by:Marc Zyngier <maz@kernel.org> Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
Loading
-
mentioned in commit 09fd9678
-
mentioned in commit 9e64da7c
-
mentioned in commit 852aab24
-
mentioned in commit b00a42d0
-
mentioned in commit 4d8c18eb
-
mentioned in commit 6111a2a6
-
mentioned in commit 30fd5ce5
-
mentioned in commit 997a30b7
-
mentioned in commit c5931eb2
-
mentioned in commit 95980f7c
-
mentioned in commit cfb07f83
-
mentioned in commit 6b11142d
-
mentioned in commit 43b996bd
-
mentioned in commit 57b2c21f
-
mentioned in commit 959df0ef
-
mentioned in commit 15c60414
-
mentioned in commit 9c53ddf5
-
mentioned in commit 6ab2f63b
-
mentioned in commit 422970a8
-
mentioned in commit 9e5c9718
-
mentioned in commit a8714642
-
mentioned in commit ad3ba24a
-
mentioned in commit b158e916
-
mentioned in commit 8f5a2319
Please sign in to comment