diff options
| author | Maxime Ripard <mripard@kernel.org> | 2026-04-23 14:43:06 +0200 |
|---|---|---|
| committer | Maxime Ripard <mripard@kernel.org> | 2026-04-23 14:43:06 +0200 |
| commit | d13e855ee923c2ae78307bf6c354305f1406b9e2 (patch) | |
| tree | 07313514d19864c9e269993220dbcc5070df4504 /include/linux/eventpoll.h | |
| parent | 0b13173d27fa15679463b62a10cfa8b3d6c3a71c (diff) | |
| parent | 028ef9c96e96197026887c0f092424679298aae8 (diff) | |
Merge drm/drm-fixes into drm-misc-fixes
Tomi needs 7.0 to apply a patch from drm-misc-fixes.
Signed-off-by: Maxime Ripard <mripard@kernel.org>
Diffstat (limited to 'include/linux/eventpoll.h')
| -rw-r--r-- | include/linux/eventpoll.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/include/linux/eventpoll.h b/include/linux/eventpoll.h index ccb478eb174b..ea9ca0e4172a 100644 --- a/include/linux/eventpoll.h +++ b/include/linux/eventpoll.h @@ -82,11 +82,14 @@ static inline struct epoll_event __user * epoll_put_uevent(__poll_t revents, __u64 data, struct epoll_event __user *uevent) { - if (__put_user(revents, &uevent->events) || - __put_user(data, &uevent->data)) - return NULL; - + scoped_user_write_access_size(uevent, sizeof(*uevent), efault) { + unsafe_put_user(revents, &uevent->events, efault); + unsafe_put_user(data, &uevent->data, efault); + } return uevent+1; + +efault: + return NULL; } #endif |
