Christian Brauner
07422c948f
eventpoll: drop vestigial epi->dying flag
...
With ep_remove() now pinning @file via epi_fget() across the
f_ep clear and hlist_del_rcu(), the dying flag no longer
orchestrates anything: it was set in eventpoll_release_file()
(which only runs from __fput(), i.e. after @file's refcount has
reached zero) and read in __ep_remove() / ep_remove() as a cheap
bail before attempting the same synchronization epi_fget() now
provides unconditionally.
The implication is simple: epi->dying == true always coincides
with file_ref_get(&file->f_ref) == false, because __fput() is
reachable only once the refcount hits zero and the refcount is
monotone in that state. The READ_ONCE(epi->dying) in ep_remove()
therefore selects exactly the same callers that epi_fget() would
reject, just one atomic cheaper. That's not worth a struct
field, a second coordination mechanism, and the comments on
both.
Refresh the eventpoll_release_file() comment to describe what
actually makes the path race-free now (the pin in ep_remove()).
No functional change: the correctness argument is unchanged,
only the mechanism is now a single one instead of two.
Link: https://patch.msgid.link/20260423-work-epoll-uaf-v1-10-2470f9eec0f5@kernel.org
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org >
2026-04-24 00:37:01 +02:00
..
2026-03-06 14:31:28 +01:00
2026-04-13 14:20:11 -07:00
2026-04-13 16:39:01 -07:00
2026-04-13 12:19:01 -07:00
2026-04-13 14:20:11 -07:00
2026-03-06 14:31:28 +01:00
2026-04-13 12:46:42 -07:00
2026-04-13 16:35:32 -07:00
2026-04-13 12:19:01 -07:00
2026-04-13 12:19:01 -07:00
2026-03-06 14:31:28 +01:00
2026-02-21 17:09:51 -08:00
2026-03-06 14:31:28 +01:00
2026-04-13 17:29:12 -07:00
2026-04-02 16:15:23 +02:00
2026-02-21 17:09:51 -08:00
2026-02-21 17:09:51 -08:00
2026-03-06 14:31:28 +01:00
2026-02-21 17:09:51 -08:00
2026-03-06 14:31:28 +01:00
2026-04-13 16:59:19 -07:00
2026-04-13 16:57:31 -07:00
2026-03-06 14:31:28 +01:00
2026-04-13 12:46:42 -07:00
2026-04-13 17:29:12 -07:00
2026-04-13 17:29:12 -07:00
2026-04-13 12:46:42 -07:00
2026-03-06 14:31:28 +01:00
2026-04-24 00:34:58 +02:00
2026-04-13 12:46:42 -07:00
2026-04-13 14:20:11 -07:00
2026-04-13 16:50:38 -07:00
2026-02-21 17:09:51 -08:00
2026-03-06 14:31:28 +01:00
2026-03-26 15:03:30 +01:00
2026-04-13 17:29:12 -07:00
2026-03-06 14:31:30 +01:00
2026-04-13 12:19:01 -07:00
2026-03-06 14:31:28 +01:00
2026-03-06 14:31:28 +01:00
2026-04-13 19:03:11 -07:00
2026-03-06 14:31:28 +01:00
2026-04-13 12:46:42 -07:00
2026-03-26 15:18:45 +01:00
2026-04-13 12:19:01 -07:00
2026-01-02 13:43:41 -05:00
2026-04-13 12:19:01 -07:00
2026-04-13 16:53:19 -07:00
2025-12-01 11:58:06 +02:00
2026-03-06 14:31:28 +01:00
2026-04-13 12:46:42 -07:00
2026-04-13 12:46:42 -07:00
2026-04-13 14:20:11 -07:00
2026-03-06 14:31:28 +01:00
2026-04-13 15:17:28 -07:00
2026-04-13 14:20:11 -07:00
2026-04-10 23:59:41 -07:00
2026-04-13 12:46:42 -07:00
2026-04-13 12:46:42 -07:00
2026-02-21 17:09:51 -08:00
2026-02-21 17:09:51 -08:00
2026-02-21 17:09:51 -08:00
2026-02-18 20:50:32 -08:00
2026-04-13 09:14:54 -05:00
2026-02-24 11:13:27 -08:00
2026-04-13 19:03:11 -07:00
2026-03-18 11:41:53 -07:00
2026-02-21 17:09:51 -08:00
2026-03-06 14:31:28 +01:00
2026-04-13 12:46:42 -07:00
2026-04-13 12:46:42 -07:00
2026-02-21 17:09:51 -08:00
2026-02-21 17:09:51 -08:00
2026-04-13 12:19:01 -07:00
2026-04-13 17:03:48 -07:00
2026-03-06 14:31:28 +01:00
2026-04-24 00:34:59 +02:00
2026-04-07 11:26:11 +02:00
2026-04-03 16:53:50 -04:00
2026-01-12 14:01:32 +01:00
2026-04-13 12:19:01 -07:00
2026-02-23 11:19:19 +01:00
2026-02-21 17:09:51 -08:00
2026-01-02 12:04:28 -08:00
2026-04-24 00:34:59 +02:00
2026-02-21 17:09:51 -08:00
2026-04-13 14:20:11 -07:00
2026-04-07 12:32:22 +02:00
2025-12-05 13:52:43 -08:00
2026-04-13 17:09:00 -07:00
2026-02-21 17:09:51 -08:00
2026-04-24 00:37:01 +02:00
2026-04-01 12:26:07 -07:00
2026-02-21 17:09:51 -08:00
2026-02-21 20:03:00 -08:00
2026-02-25 10:34:23 -08:00
2026-04-13 15:17:28 -07:00
2026-04-13 14:20:11 -07:00
2026-01-16 12:52:04 -05:00
2026-04-13 14:20:11 -07:00
2026-02-19 14:34:26 +01:00
2026-01-14 16:50:37 +01:00
2026-04-24 00:34:58 +02:00
2026-03-06 14:31:28 +01:00
2026-02-21 17:09:51 -08:00
2026-02-09 16:58:28 -08:00
2026-04-13 12:46:42 -07:00
2026-04-13 15:17:28 -07:00
2026-04-13 12:46:42 -07:00
2026-03-06 14:31:28 +01:00
2026-02-09 13:41:34 -08:00
2026-04-13 14:20:11 -07:00
2026-02-21 01:02:28 -08:00
2026-01-12 16:52:09 +01:00
2026-03-27 17:01:36 +01:00
2026-04-13 14:20:11 -07:00
2026-02-25 10:34:23 -08:00
2026-04-13 12:19:01 -07:00
2026-01-12 16:52:09 +01:00
2026-03-23 12:41:58 +01:00
2026-04-13 13:27:11 -07:00
2026-03-06 14:31:28 +01:00
2026-02-21 01:02:28 -08:00
2026-01-12 10:55:45 +01:00
2026-03-24 14:44:02 +01:00
2026-04-13 14:20:11 -07:00
2026-02-21 01:02:28 -08:00
2026-02-21 17:09:51 -08:00
2026-02-21 17:09:51 -08:00
2026-01-16 12:52:04 -05:00
2026-01-16 12:52:04 -05:00
2026-02-21 17:09:51 -08:00
2026-02-21 01:02:28 -08:00
2026-02-21 17:09:51 -08:00
2026-02-21 17:09:51 -08:00
2026-01-16 12:52:03 -05:00
2026-03-02 11:06:42 +01:00