summaryrefslogtreecommitdiff
path: root/tools/lib/python
diff options
context:
space:
mode:
authorTianyi Chen <hi@tychen.cc>2026-10-19 18:39:27 +0900
committerChristian Brauner <brauner@kernel.org>2026-10-22 18:17:43 +0200
commit9f2b8f4a452db79741c06e6ea91448347f4a975c (patch)
tree3d688650b8fb1a6f521e2f9cfba1dd0d3b651aa6 /tools/lib/python
parent90c96612460e6accddbda5a195e6ddaa391ecde0 (diff)
eventpoll: propagate wakeup source creation failure in ep_modify()
When EPOLL_CTL_MOD adds EPOLLWAKEUP, ep_modify() ignores the return value of ep_create_wakeup_source(). If allocation fails, it returns success with EPOLLWAKEUP set but no per-item wakeup source, so the requested suspend protection is missing. This can happen without fault injection on SELinux systems: creating the wakeup source's sysfs nodes can require GFP_KERNEL_ACCOUNT allocations for security.selinux xattrs, which can fail when the caller's memory cgroup is over its limit. Create the wakeup source before updating the event mask and data, and return the error if creation fails. Leave any newly created per-epoll source in place until ep_free(), as ep_insert() does on failure. Fixes: 4d7e30d98939 ("epoll: Add a flag, EPOLLWAKEUP, to prevent suspend while epoll events are ready") Signed-off-by: Tianyi Chen <hi@tychen.cc> Link: https://patch.msgid.link/179240281988.1700986.8309527041821666235@tychen.cc Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions