You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
selftests/seccomp: user_notification_addfd check nextfd is available
stable inclusion
from stable-v6.6.30
commit 003af8c23fca24ec6ed5e6cd7a8176b1d27c7357
bugzilla: https://gitee.com/openeuler/kernel/issues/I9MPZ8
Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=003af8c23fca24ec6ed5e6cd7a8176b1d27c7357
--------------------------------
commit 8e3c9f9f3a0742cd12b682a1766674253b33fcf0 upstream.
Currently the user_notification_addfd test checks what the next expected
file descriptor will be by incrementing a variable nextfd. This does not
account for file descriptors that may already be open before the test is
started and will cause the test to fail if any exist.
Replace nextfd++ with a function get_next_fd which will check and return
the next available file descriptor.
Signed-off-by: Terry Tritton <terry.tritton@linaro.org>
Link: https://lore.kernel.org/r/20240124141357.1243457-4-terry.tritton@linaro.org
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: ZhangPeng <zhangpeng362@huawei.com>
0 commit comments