All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-next:master 3565/3780] io_uring/io_uring.c:431 io_prep_async_work() error: we previously assumed 'req->file' could be null (see line 424)
@ 2023-03-15 19:43 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-03-15 19:43 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp, Dan Carpenter

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: Linux Memory Management List <linux-mm@kvack.org>
TO: Jens Axboe <axboe@kernel.dk>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   225b6b81afe63b3850b7cee0a3590f51144f2a75
commit: 2b22f867be6725a9b5917d791510edf6cd5c7232 [3565/3780] io_uring: avoid hashing O_DIRECT writes if the filesystem doesn't need it
:::::: branch date: 18 hours ago
:::::: commit date: 23 hours ago
config: x86_64-randconfig-m001 (https://download.01.org/0day-ci/archive/20230316/202303160340.jZi4O4HT-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-8) 11.3.0

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Link: https://lore.kernel.org/r/202303160340.jZi4O4HT-lkp@intel.com/

smatch warnings:
io_uring/io_uring.c:431 io_prep_async_work() error: we previously assumed 'req->file' could be null (see line 424)

vim +431 io_uring/io_uring.c

cb2d344c7551c2 fs/io_uring.c       Pavel Begunkov 2022-04-15  407  
1e6fa5216a0e59 fs/io_uring.c       Jens Axboe     2020-10-15  408  static void io_prep_async_work(struct io_kiocb *req)
1e6fa5216a0e59 fs/io_uring.c       Jens Axboe     2020-10-15  409  {
a7dd27828b00be io_uring/io_uring.c Breno Leitao   2023-01-12  410  	const struct io_issue_def *def = &io_issue_defs[req->opcode];
1e6fa5216a0e59 fs/io_uring.c       Jens Axboe     2020-10-15  411  	struct io_ring_ctx *ctx = req->ctx;
1e6fa5216a0e59 fs/io_uring.c       Jens Axboe     2020-10-15  412  
b8e64b53001116 fs/io_uring.c       Pavel Begunkov 2021-06-17  413  	if (!(req->flags & REQ_F_CREDS)) {
b8e64b53001116 fs/io_uring.c       Pavel Begunkov 2021-06-17  414  		req->flags |= REQ_F_CREDS;
c10d1f986b4e2a fs/io_uring.c       Pavel Begunkov 2021-06-17  415  		req->creds = get_current_cred();
b8e64b53001116 fs/io_uring.c       Pavel Begunkov 2021-06-17  416  	}
003e8dccdb2271 fs/io_uring.c       Jens Axboe     2021-03-06  417  
e1d675df1a36e3 fs/io_uring.c       Pavel Begunkov 2021-03-22  418  	req->work.list.next = NULL;
e1d675df1a36e3 fs/io_uring.c       Pavel Begunkov 2021-03-22  419  	req->work.flags = 0;
8e29da69feade6 fs/io_uring.c       Jens Axboe     2022-04-18  420  	req->work.cancel_seq = atomic_read(&ctx->cancel_seq);
feaadc4fc2ebdb fs/io_uring.c       Pavel Begunkov 2020-10-22  421  	if (req->flags & REQ_F_FORCE_ASYNC)
feaadc4fc2ebdb fs/io_uring.c       Pavel Begunkov 2020-10-22  422  		req->work.flags |= IO_WQ_WORK_CONCURRENT;
feaadc4fc2ebdb fs/io_uring.c       Pavel Begunkov 2020-10-22  423  
f6b543fd03d347 io_uring/io_uring.c Jens Axboe     2022-07-21 @424  	if (req->file && !io_req_ffs_set(req))
f6b543fd03d347 io_uring/io_uring.c Jens Axboe     2022-07-21  425  		req->flags |= io_file_get_flags(req->file) << REQ_F_SUPPORT_NOWAIT_BIT;
f6b543fd03d347 io_uring/io_uring.c Jens Axboe     2022-07-21  426  
1e6fa5216a0e59 fs/io_uring.c       Jens Axboe     2020-10-15  427  	if (req->flags & REQ_F_ISREG) {
2b22f867be6725 io_uring/io_uring.c Jens Axboe     2023-03-07  428  		bool should_hash = def->hash_reg_file;
2b22f867be6725 io_uring/io_uring.c Jens Axboe     2023-03-07  429  
2b22f867be6725 io_uring/io_uring.c Jens Axboe     2023-03-07  430  		/* don't serialize this request if the fs doesn't need it */
2b22f867be6725 io_uring/io_uring.c Jens Axboe     2023-03-07 @431  		if (should_hash && (req->file->f_flags & O_DIRECT) &&
2b22f867be6725 io_uring/io_uring.c Jens Axboe     2023-03-07  432  		    (req->file->f_mode & FMODE_DIO_PARALLEL_WRITE))
2b22f867be6725 io_uring/io_uring.c Jens Axboe     2023-03-07  433  			should_hash = false;
2b22f867be6725 io_uring/io_uring.c Jens Axboe     2023-03-07  434  		if (should_hash || (ctx->flags & IORING_SETUP_IOPOLL))
1e6fa5216a0e59 fs/io_uring.c       Jens Axboe     2020-10-15  435  			io_wq_hash_work(&req->work, file_inode(req->file));
4b982bd0f383db fs/io_uring.c       Jens Axboe     2021-04-01  436  	} else if (!req->file || !S_ISBLK(file_inode(req->file)->i_mode)) {
1e6fa5216a0e59 fs/io_uring.c       Jens Axboe     2020-10-15  437  		if (def->unbound_nonreg_file)
1e6fa5216a0e59 fs/io_uring.c       Jens Axboe     2020-10-15  438  			req->work.flags |= IO_WQ_WORK_UNBOUND;
1e6fa5216a0e59 fs/io_uring.c       Jens Axboe     2020-10-15  439  	}
54a91f3bb9b96e fs/io_uring.c       Jens Axboe     2019-09-10  440  }
cccf0ee834559a fs/io_uring.c       Jens Axboe     2020-01-27  441  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-03-15 19:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-15 19:43 [linux-next:master 3565/3780] io_uring/io_uring.c:431 io_prep_async_work() error: we previously assumed 'req->file' could be null (see line 424) kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.