* next: LTP: syscalls: epoll_clt() if fd is an invalid fd expected EBADF: EINVAL (22) @ 2022-12-07 15:58 Naresh Kamboju 2022-12-07 16:22 ` Jens Axboe 0 siblings, 1 reply; 4+ messages in thread From: Naresh Kamboju @ 2022-12-07 15:58 UTC (permalink / raw) To: open list, linux-fsdevel, regressions, lkft-triage, Linux-Next Mailing List, LTP List Cc: Alexander Viro, Jens Axboe, Anders Roxell, Arnd Bergmann, chrubis LTP syscalls epoll_ctl02 is failing on Linux next master. The reported problem is always reproducible and starts from next-20221205. GOOD tag: next-20221202 BAD tag: next-20221205 tst_test.c:1524: TINFO: Timeout per run is 0h 05m 00s epoll_ctl02.c:87: TPASS: epoll_clt(...) if epfd is an invalid fd : EBADF (9) epoll_ctl02.c:87: TPASS: epoll_clt(...) if fd does not support epoll : EPERM (1) epoll_ctl02.c:87: TFAIL: epoll_clt(...) if fd is an invalid fd expected EBADF: EINVAL (22) epoll_ctl02.c:87: TPASS: epoll_clt(...) if op is not supported : EINVAL (22) epoll_ctl02.c:87: TPASS: epoll_clt(...) if fd is the same as epfd : EINVAL (22) epoll_ctl02.c:87: TPASS: epoll_clt(...) if events is NULL : EFAULT (14) epoll_ctl02.c:87: TPASS: epoll_clt(...) if fd is not registered with EPOLL_CTL_DEL : ENOENT (2) epoll_ctl02.c:87: TPASS: epoll_clt(...) if fd is not registered with EPOLL_CTL_MOD : ENOENT (2) epoll_ctl02.c:87: TPASS: epoll_clt(...) if fd is already registered with EPOLL_CTL_ADD : EEXIST (17) Reported-by: Linux Kernel Functional Testing <lkft@linaro.org> Test results: https://lkft.validation.linaro.org/scheduler/job/5931196#L1367 https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20221207/testrun/13492039/suite/ltp-syscalls/test/epoll_ctl02/log https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20221205/testrun/13412113/suite/ltp-syscalls/test/epoll_ctl02/details/ Test results comparison: https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20221207/testrun/13492039/suite/ltp-syscalls/test/epoll_ctl02/history/ metadata: git_ref: master git_repo: https://gitlab.com/Linaro/lkft/mirrors/next/linux-next git_sha: ee9bda616d36d2dc864aa294c2656fad88c9efa0 git_describe: next-20221205 kernel_version: 6.1.0-rc7 kernel-config: https://builds.tuxbuild.com/2ITqQKvBJSwcIYKcYvEdPjjrw64/config build-url: https://gitlab.com/Linaro/lkft/mirrors/next/linux-next/-/pipelines/713047540 artifact-location: https://builds.tuxbuild.com/2ITqQKvBJSwcIYKcYvEdPjjrw64 toolchain: gcc-11 -- Linaro LKFT https://lkft.linaro.org ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: next: LTP: syscalls: epoll_clt() if fd is an invalid fd expected EBADF: EINVAL (22) 2022-12-07 15:58 next: LTP: syscalls: epoll_clt() if fd is an invalid fd expected EBADF: EINVAL (22) Naresh Kamboju @ 2022-12-07 16:22 ` Jens Axboe 2022-12-07 22:27 ` Anders Roxell 0 siblings, 1 reply; 4+ messages in thread From: Jens Axboe @ 2022-12-07 16:22 UTC (permalink / raw) To: Naresh Kamboju, open list, linux-fsdevel, regressions, lkft-triage, Linux-Next Mailing List, LTP List Cc: Alexander Viro, Anders Roxell, Arnd Bergmann, chrubis On 12/7/22 8:58?AM, Naresh Kamboju wrote: > LTP syscalls epoll_ctl02 is failing on Linux next master. > The reported problem is always reproducible and starts from next-20221205. > > GOOD tag: next-20221202 > BAD tag: next-20221205 > > tst_test.c:1524: TINFO: Timeout per run is 0h 05m 00s > epoll_ctl02.c:87: TPASS: epoll_clt(...) if epfd is an invalid fd : EBADF (9) > epoll_ctl02.c:87: TPASS: epoll_clt(...) if fd does not support epoll : EPERM (1) > epoll_ctl02.c:87: TFAIL: epoll_clt(...) if fd is an invalid fd > expected EBADF: EINVAL (22) > epoll_ctl02.c:87: TPASS: epoll_clt(...) if op is not supported : EINVAL (22) > epoll_ctl02.c:87: TPASS: epoll_clt(...) if fd is the same as epfd : EINVAL (22) > epoll_ctl02.c:87: TPASS: epoll_clt(...) if events is NULL : EFAULT (14) > epoll_ctl02.c:87: TPASS: epoll_clt(...) if fd is not registered with > EPOLL_CTL_DEL : ENOENT (2) > epoll_ctl02.c:87: TPASS: epoll_clt(...) if fd is not registered with > EPOLL_CTL_MOD : ENOENT (2) > epoll_ctl02.c:87: TPASS: epoll_clt(...) if fd is already registered > with EPOLL_CTL_ADD : EEXIST (17) This should fix it: diff --git a/fs/eventpoll.c b/fs/eventpoll.c index ec7ffce8265a..de9c551e1993 100644 --- a/fs/eventpoll.c +++ b/fs/eventpoll.c @@ -2195,6 +2195,7 @@ int do_epoll_ctl(int epfd, int op, int fd, struct epoll_event *epds, } /* Get the "struct file *" for the target file */ + error = -EBADF; tf = fdget(fd); if (!tf.file) goto error_fput; -- Jens Axboe ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: next: LTP: syscalls: epoll_clt() if fd is an invalid fd expected EBADF: EINVAL (22) 2022-12-07 16:22 ` Jens Axboe @ 2022-12-07 22:27 ` Anders Roxell 2022-12-08 1:36 ` Jens Axboe 0 siblings, 1 reply; 4+ messages in thread From: Anders Roxell @ 2022-12-07 22:27 UTC (permalink / raw) To: Jens Axboe Cc: Naresh Kamboju, open list, linux-fsdevel, regressions, lkft-triage, Linux-Next Mailing List, LTP List, Alexander Viro, Arnd Bergmann, chrubis On Wed, 7 Dec 2022 at 17:22, Jens Axboe <axboe@kernel.dk> wrote: > > On 12/7/22 8:58?AM, Naresh Kamboju wrote: > > LTP syscalls epoll_ctl02 is failing on Linux next master. > > The reported problem is always reproducible and starts from next-20221205. > > > > GOOD tag: next-20221202 > > BAD tag: next-20221205 > > > > tst_test.c:1524: TINFO: Timeout per run is 0h 05m 00s > > epoll_ctl02.c:87: TPASS: epoll_clt(...) if epfd is an invalid fd : EBADF (9) > > epoll_ctl02.c:87: TPASS: epoll_clt(...) if fd does not support epoll : EPERM (1) > > epoll_ctl02.c:87: TFAIL: epoll_clt(...) if fd is an invalid fd > > expected EBADF: EINVAL (22) > > epoll_ctl02.c:87: TPASS: epoll_clt(...) if op is not supported : EINVAL (22) > > epoll_ctl02.c:87: TPASS: epoll_clt(...) if fd is the same as epfd : EINVAL (22) > > epoll_ctl02.c:87: TPASS: epoll_clt(...) if events is NULL : EFAULT (14) > > epoll_ctl02.c:87: TPASS: epoll_clt(...) if fd is not registered with > > EPOLL_CTL_DEL : ENOENT (2) > > epoll_ctl02.c:87: TPASS: epoll_clt(...) if fd is not registered with > > EPOLL_CTL_MOD : ENOENT (2) > > epoll_ctl02.c:87: TPASS: epoll_clt(...) if fd is already registered > > with EPOLL_CTL_ADD : EEXIST (17) > > This should fix it: > > > diff --git a/fs/eventpoll.c b/fs/eventpoll.c > index ec7ffce8265a..de9c551e1993 100644 > --- a/fs/eventpoll.c > +++ b/fs/eventpoll.c > @@ -2195,6 +2195,7 @@ int do_epoll_ctl(int epfd, int op, int fd, struct epoll_event *epds, > } > > /* Get the "struct file *" for the target file */ > + error = -EBADF; > tf = fdget(fd); > if (!tf.file) > goto error_fput; Yes this patch fixed the issue [1]. Cheers, Anders [1] https://lkft.validation.linaro.org/scheduler/job/5931365#L1371 ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: next: LTP: syscalls: epoll_clt() if fd is an invalid fd expected EBADF: EINVAL (22) 2022-12-07 22:27 ` Anders Roxell @ 2022-12-08 1:36 ` Jens Axboe 0 siblings, 0 replies; 4+ messages in thread From: Jens Axboe @ 2022-12-08 1:36 UTC (permalink / raw) To: Anders Roxell Cc: Naresh Kamboju, open list, linux-fsdevel, regressions, lkft-triage, Linux-Next Mailing List, LTP List, Alexander Viro, Arnd Bergmann, chrubis On 12/7/22 3:27 PM, Anders Roxell wrote: > On Wed, 7 Dec 2022 at 17:22, Jens Axboe <axboe@kernel.dk> wrote: >> >> On 12/7/22 8:58?AM, Naresh Kamboju wrote: >>> LTP syscalls epoll_ctl02 is failing on Linux next master. >>> The reported problem is always reproducible and starts from next-20221205. >>> >>> GOOD tag: next-20221202 >>> BAD tag: next-20221205 >>> >>> tst_test.c:1524: TINFO: Timeout per run is 0h 05m 00s >>> epoll_ctl02.c:87: TPASS: epoll_clt(...) if epfd is an invalid fd : EBADF (9) >>> epoll_ctl02.c:87: TPASS: epoll_clt(...) if fd does not support epoll : EPERM (1) >>> epoll_ctl02.c:87: TFAIL: epoll_clt(...) if fd is an invalid fd >>> expected EBADF: EINVAL (22) >>> epoll_ctl02.c:87: TPASS: epoll_clt(...) if op is not supported : EINVAL (22) >>> epoll_ctl02.c:87: TPASS: epoll_clt(...) if fd is the same as epfd : EINVAL (22) >>> epoll_ctl02.c:87: TPASS: epoll_clt(...) if events is NULL : EFAULT (14) >>> epoll_ctl02.c:87: TPASS: epoll_clt(...) if fd is not registered with >>> EPOLL_CTL_DEL : ENOENT (2) >>> epoll_ctl02.c:87: TPASS: epoll_clt(...) if fd is not registered with >>> EPOLL_CTL_MOD : ENOENT (2) >>> epoll_ctl02.c:87: TPASS: epoll_clt(...) if fd is already registered >>> with EPOLL_CTL_ADD : EEXIST (17) >> >> This should fix it: >> >> >> diff --git a/fs/eventpoll.c b/fs/eventpoll.c >> index ec7ffce8265a..de9c551e1993 100644 >> --- a/fs/eventpoll.c >> +++ b/fs/eventpoll.c >> @@ -2195,6 +2195,7 @@ int do_epoll_ctl(int epfd, int op, int fd, struct epoll_event *epds, >> } >> >> /* Get the "struct file *" for the target file */ >> + error = -EBADF; >> tf = fdget(fd); >> if (!tf.file) >> goto error_fput; > > Yes this patch fixed the issue [1]. > > Cheers, > Anders > [1] https://lkft.validation.linaro.org/scheduler/job/5931365#L1371 Great, thanks for confirming. I did queue up the fix. -- Jens Axboe ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-12-08 1:36 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2022-12-07 15:58 next: LTP: syscalls: epoll_clt() if fd is an invalid fd expected EBADF: EINVAL (22) Naresh Kamboju 2022-12-07 16:22 ` Jens Axboe 2022-12-07 22:27 ` Anders Roxell 2022-12-08 1:36 ` Jens Axboe
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox