]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
eventpoll: drop dead bool return from ep_remove_epi()
authorChristian Brauner <brauner@kernel.org>
Thu, 23 Apr 2026 09:56:12 +0000 (11:56 +0200)
committerChristian Brauner <brauner@kernel.org>
Thu, 23 Apr 2026 22:36:57 +0000 (00:36 +0200)
commit3a4551ea9c042502019b1d8a986e962cb9015366
tree916990e767efc24cff025cc0c40fd1e5f8c75431
parent33e92e9ecf48c08cb4807e9a36f9eb01619c1a1e
eventpoll: drop dead bool return from ep_remove_epi()

ep_remove_epi() always returns true -- the "can be disposed"
answer was meaningful back when the dying-check lived inside the
pre-split __ep_remove(), but after that check moved to ep_remove()
the return value is just noise. Both callers gate on it
unconditionally:

  if (ep_remove_epi(ep, epi))
      WARN_ON_ONCE(ep_refcount_dec_and_test(ep));

  dispose = ep_remove_epi(ep, epi);
  ...
  if (dispose && ep_refcount_dec_and_test(ep))
      ep_free(ep);

Make ep_remove_epi() return void, drop the dispose local in
eventpoll_release_file(), and the useless conditionals at both
callers. No functional change.

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