[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CADYN=9LaiBU-Q5=FSvFKTi_qzE1C45DkdUAfbaZH7FZhn2tbYw@mail.gmail.com>
Date: Wed, 7 Dec 2022 23:27:11 +0100
From: Anders Roxell <anders.roxell@...aro.org>
To: Jens Axboe <axboe@...nel.dk>
Cc: Naresh Kamboju <naresh.kamboju@...aro.org>,
open list <linux-kernel@...r.kernel.org>,
linux-fsdevel@...r.kernel.org, regressions@...ts.linux.dev,
lkft-triage@...ts.linaro.org,
Linux-Next Mailing List <linux-next@...r.kernel.org>,
LTP List <ltp@...ts.linux.it>,
Alexander Viro <viro@...iv.linux.org.uk>,
Arnd Bergmann <arnd@...db.de>, chrubis <chrubis@...e.cz>
Subject: Re: next: LTP: syscalls: epoll_clt() if fd is an invalid fd expected
EBADF: EINVAL (22)
On Wed, 7 Dec 2022 at 17:22, Jens Axboe <axboe@...nel.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
Powered by blists - more mailing lists