diff options
author | David Disseldorp <ddiss@suse.de> | 2023-03-07 18:21:06 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-03-17 10:45:13 +0300 |
commit | b1fddddf58acd6d9618a2e3e974f3a2629b2ebf5 (patch) | |
tree | 79b7dfd1cc3f7831c9a8fb15b576d14788b9cbac /init/do_mounts_rd.c | |
parent | f2a5ec7f7b28f9b9cd5fac232ff51019a7f7b9e9 (diff) | |
download | linux-b1fddddf58acd6d9618a2e3e974f3a2629b2ebf5.tar.xz |
watch_queue: fix IOC_WATCH_QUEUE_SET_SIZE alloc error paths
[ Upstream commit 03e1d60e177eedbd302b77af4ea5e21b5a7ade31 ]
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: c73be61cede58 ("pipe: Add general notification queue support")
Signed-off-by: David Disseldorp <ddiss@suse.de>
Signed-off-by: Christian Brauner (Microsoft) <brauner@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'init/do_mounts_rd.c')
0 files changed, 0 insertions, 0 deletions