tree:
https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git
queue-5.10
head: 9ced6633127bd25a94939777d9ecda54800859fc
commit: 0b80f78d907debe5f8ba3cef42b659b89352310a [45/74] io_uring/io-wq: kill off now
unused IO_WQ_WORK_NO_CANCEL
config: nios2-defconfig (attached as .config)
compiler: nios2-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
#
https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git/c...
git remote add sashal-linux-stable
https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git
git fetch --no-tags sashal-linux-stable queue-5.10
git checkout 0b80f78d907debe5f8ba3cef42b659b89352310a
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=nios2
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
fs/io_uring.c: In function 'io_prep_async_work':
fs/io_uring.c:1431:22: warning: variable 'id' set but not used
[-Wunused-but-set-variable]
1431 | struct io_identity *id;
| ^~
fs/io_uring.c: In function 'io_close':
> fs/io_uring.c:4281:22: error: 'IO_WQ_WORK_NO_CANCEL'
undeclared (first use in this function); did you mean 'IO_WQ_WORK_CANCEL'?
4281 | req->work.flags |= IO_WQ_WORK_NO_CANCEL;
| ^~~~~~~~~~~~~~~~~~~~
| IO_WQ_WORK_CANCEL
fs/io_uring.c:4281:22: note: each undeclared identifier is reported only once for each
function it appears in
vim +4281 fs/io_uring.c
b5dba59e0cf7e2 Jens Axboe 2019-12-11 4264
229a7b63507a3e Jens Axboe 2020-06-22 4265 static int io_close(struct io_kiocb *req,
bool force_nonblock,
229a7b63507a3e Jens Axboe 2020-06-22 4266 struct io_comp_state *cs)
b5dba59e0cf7e2 Jens Axboe 2019-12-11 4267 {
3af73b286ccee4 Pavel Begunkov 2020-06-08 4268 struct io_close *close =
&req->close;
b5dba59e0cf7e2 Jens Axboe 2019-12-11 4269 int ret;
b5dba59e0cf7e2 Jens Axboe 2019-12-11 4270
3af73b286ccee4 Pavel Begunkov 2020-06-08 4271 /* might be already done during nonblock
submission */
3af73b286ccee4 Pavel Begunkov 2020-06-08 4272 if (!close->put_file) {
3af73b286ccee4 Pavel Begunkov 2020-06-08 4273 ret = __close_fd_get_file(close->fd,
&close->put_file);
b5dba59e0cf7e2 Jens Axboe 2019-12-11 4274 if (ret < 0)
0bf0eefdab52d9 Pavel Begunkov 2020-05-26 4275 return (ret == -ENOENT) ? -EBADF :
ret;
3af73b286ccee4 Pavel Begunkov 2020-06-08 4276 }
b5dba59e0cf7e2 Jens Axboe 2019-12-11 4277
b5dba59e0cf7e2 Jens Axboe 2019-12-11 4278 /* if the file has a flush method, be
safe and punt to async */
3af73b286ccee4 Pavel Begunkov 2020-06-08 4279 if (close->put_file->f_op->flush
&& force_nonblock) {
f3ac7a5996d7cd Jens Axboe 2021-01-19 4280 /* not safe to cancel at this point */
f3ac7a5996d7cd Jens Axboe 2021-01-19 @4281 req->work.flags |=
IO_WQ_WORK_NO_CANCEL;
24c74678634b3c Pavel Begunkov 2020-06-21 4282 /* was never set, but play safe */
24c74678634b3c Pavel Begunkov 2020-06-21 4283 req->flags &= ~REQ_F_NOWAIT;
0bf0eefdab52d9 Pavel Begunkov 2020-05-26 4284 /* avoid grabbing files - we don't
need the files */
24c74678634b3c Pavel Begunkov 2020-06-21 4285 req->flags |= REQ_F_NO_FILE_TABLE;
0bf0eefdab52d9 Pavel Begunkov 2020-05-26 4286 return -EAGAIN;
b5dba59e0cf7e2 Jens Axboe 2019-12-11 4287 }
b5dba59e0cf7e2 Jens Axboe 2019-12-11 4288
3af73b286ccee4 Pavel Begunkov 2020-06-08 4289 /* No ->flush() or already async,
safely close from here */
98447d65b4a7a5 Jens Axboe 2020-10-14 4290 ret = filp_close(close->put_file,
req->work.identity->files);
3af73b286ccee4 Pavel Begunkov 2020-06-08 4291 if (ret < 0)
3af73b286ccee4 Pavel Begunkov 2020-06-08 4292 req_set_fail_links(req);
3af73b286ccee4 Pavel Begunkov 2020-06-08 4293 fput(close->put_file);
3af73b286ccee4 Pavel Begunkov 2020-06-08 4294 close->put_file = NULL;
229a7b63507a3e Jens Axboe 2020-06-22 4295 __io_req_complete(req, ret, 0, cs);
a2100672f3b2af Pavel Begunkov 2020-03-02 4296 return 0;
a2100672f3b2af Pavel Begunkov 2020-03-02 4297 }
a2100672f3b2af Pavel Begunkov 2020-03-02 4298
:::::: The code at line 4281 was first introduced by commit
:::::: f3ac7a5996d7cd739664c5f71cab4f8da03937e7 io_uring: fix SQPOLL IORING_OP_CLOSE
cancelation state
:::::: TO: Jens Axboe <axboe(a)kernel.dk>
:::::: CC: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org