Commit e2ab7877 authored by Terry Tritton's avatar Terry Tritton Committed by Treehugger Robot
Browse files

UPSTREAM: selftests/seccomp: user_notification_addfd check nextfd is available



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.

Change-Id: If8e101d45084b86b130e9678660965809e129aad
Signed-off-by: default avatarTerry Tritton <terry.tritton@linaro.org>
Link: https://lore.kernel.org/r/20240124141357.1243457-4-terry.tritton@linaro.org


Signed-off-by: default avatarKees Cook <keescook@chromium.org>
(cherry picked from commit 8e3c9f9f)
Signed-off-by: default avatarEdward Liaw <edliaw@google.com>
parent a84e3bf5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment