Skip to content
Commit 587a6fda authored by David Disseldorp's avatar David Disseldorp Committed by Greg Kroah-Hartman
Browse files

watch_queue: fix IOC_WATCH_QUEUE_SET_SIZE alloc error paths

[ Upstream commit 03e1d60e ]

The watch_queue_set_size() allocation error paths return the ret value
set via the prior pipe_resize_ring() call, which will always be zero.

As a result, IOC_WATCH_QUEUE_SET_SIZE callers such as "keyctl watch"
fail to detect kernel wqueue->notes allocation failures and proceed to
KEYCTL_WATCH_KEY, with any notifications subsequently lost.

Fixes: c73be61c

 ("pipe: Add general notification queue support")
Signed-off-by: default avatarDavid Disseldorp <ddiss@suse.de>
Signed-off-by: default avatarChristian Brauner (Microsoft) <brauner@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 09fa1a6b
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment