diff options
author | Vincent Donnefort <vdonnefort@google.com> | 2024-01-31 14:09:55 +0000 |
---|---|---|
committer | Steven Rostedt (Google) <rostedt@goodmis.org> | 2024-01-31 14:10:24 -0500 |
commit | 66bbea9ed6446b8471d365a22734dc00556c4785 (patch) | |
tree | 4962471ce047588b65de7cbab9e832e4cf3d979b /samples/hid | |
parent | 29142dc92c37d3259a33aef15b03e6ee25b0d188 (diff) | |
download | linux-stable-66bbea9ed6446b8471d365a22734dc00556c4785.tar.gz linux-stable-66bbea9ed6446b8471d365a22734dc00556c4785.tar.bz2 linux-stable-66bbea9ed6446b8471d365a22734dc00556c4785.zip |
ring-buffer: Clean ring_buffer_poll_wait() error return
The return type for ring_buffer_poll_wait() is __poll_t. This is behind
the scenes an unsigned where we can set event bits. In case of a
non-allocated CPU, we do return instead -EINVAL (0xffffffea). Lucky us,
this ends up setting few error bits (EPOLLERR | EPOLLHUP | EPOLLNVAL), so
user-space at least is aware something went wrong.
Nonetheless, this is an incorrect code. Replace that -EINVAL with a
proper EPOLLERR to clean that output. As this doesn't change the
behaviour, there's no need to treat this change as a bug fix.
Link: https://lore.kernel.org/linux-trace-kernel/20240131140955.3322792-1-vdonnefort@google.com
Cc: stable@vger.kernel.org
Fixes: 6721cb6002262 ("ring-buffer: Do not poll non allocated cpu buffers")
Signed-off-by: Vincent Donnefort <vdonnefort@google.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Diffstat (limited to 'samples/hid')
0 files changed, 0 insertions, 0 deletions