]> git.ipfire.org Git - thirdparty/linux.git/commit
eventpoll: use hlist_is_singular_node() in __ep_remove()
authorChristian Brauner <brauner@kernel.org>
Thu, 23 Apr 2026 09:56:04 +0000 (11:56 +0200)
committerChristian Brauner <brauner@kernel.org>
Thu, 23 Apr 2026 22:35:41 +0000 (00:35 +0200)
commit3d9fd0abc94d8cd430cc7cd7d37ce5e5aae2cd2b
tree668f5707a75ce1ef077bc13e37f17ee067af7917
parent9a466382c5e1ab706e155914e5532c80c2f3f76c
eventpoll: use hlist_is_singular_node() in __ep_remove()

Replace the open-coded "epi is the only entry in file->f_ep" check
with hlist_is_singular_node(). Same semantics, and the helper avoids
the head-cacheline access in the common false case.

Link: https://patch.msgid.link/20260423-work-epoll-uaf-v1-1-2470f9eec0f5@kernel.org
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
fs/eventpoll.c