All of lore.kernel.org
 help / color / mirror / Atom feed
* fs/io_uring.c:5550 io_timeout_cancel() warn: passing a valid pointer to 'PTR_ERR'
@ 2021-06-22  1:47 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-06-22  1:47 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 4179 bytes --]

CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Pavel Begunkov <asml.silence@gmail.com>
CC: Jens Axboe <axboe@kernel.dk>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   a96bfed64c8986d6404e553f18203cae1f5ac7e6
commit: fd9c7bc542dae7cca3b02c77f7863823d54ddee0 io_uring: refactor hrtimer_try_to_cancel uses
date:   10 weeks ago
:::::: branch date: 9 hours ago
:::::: commit date: 10 weeks ago
config: parisc-randconfig-m031-20210621 (attached as .config)
compiler: hppa-linux-gcc (GCC) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

New smatch warnings:
fs/io_uring.c:5550 io_timeout_cancel() warn: passing a valid pointer to 'PTR_ERR'
fs/io_uring.c:5566 io_timeout_update() warn: passing a valid pointer to 'PTR_ERR'

Old smatch warnings:
fs/io_uring.c:4669 io_recv() error: uninitialized symbol 'flags'.
fs/io_uring.c:4964 io_poll_double_wake() warn: variable dereferenced before check 'poll' (see line 4959)
arch/parisc/include/asm/hash.h:44 __hash_32() warn: inconsistent indenting

vim +/PTR_ERR +5550 fs/io_uring.c

47f467686ec02f Jens Axboe     2019-11-09  5543  
fbd15848f3c135 Pavel Begunkov 2020-11-30  5544  static int io_timeout_cancel(struct io_ring_ctx *ctx, __u64 user_data)
e07785b0029165 Pavel Begunkov 2021-04-01  5545  	__must_hold(&ctx->completion_lock)
fbd15848f3c135 Pavel Begunkov 2020-11-30  5546  {
fbd15848f3c135 Pavel Begunkov 2020-11-30  5547  	struct io_kiocb *req = io_timeout_extract(ctx, user_data);
fbd15848f3c135 Pavel Begunkov 2020-11-30  5548  
fbd15848f3c135 Pavel Begunkov 2020-11-30  5549  	if (IS_ERR(req))
fbd15848f3c135 Pavel Begunkov 2020-11-30 @5550  		return PTR_ERR(req);
f254ac04c8744c Jens Axboe     2020-08-12  5551  
f254ac04c8744c Jens Axboe     2020-08-12  5552  	req_set_fail_links(req);
ff64216423d463 Pavel Begunkov 2021-04-11  5553  	io_cqring_fill_event(req, -ECANCELED, 0);
216578e55ac932 Pavel Begunkov 2020-10-13  5554  	io_put_req_deferred(req, 1);
f254ac04c8744c Jens Axboe     2020-08-12  5555  	return 0;
f254ac04c8744c Jens Axboe     2020-08-12  5556  }
f254ac04c8744c Jens Axboe     2020-08-12  5557  
9c8e11b36c9b64 Pavel Begunkov 2020-11-30  5558  static int io_timeout_update(struct io_ring_ctx *ctx, __u64 user_data,
9c8e11b36c9b64 Pavel Begunkov 2020-11-30  5559  			     struct timespec64 *ts, enum hrtimer_mode mode)
e07785b0029165 Pavel Begunkov 2021-04-01  5560  	__must_hold(&ctx->completion_lock)
47f467686ec02f Jens Axboe     2019-11-09  5561  {
9c8e11b36c9b64 Pavel Begunkov 2020-11-30  5562  	struct io_kiocb *req = io_timeout_extract(ctx, user_data);
9c8e11b36c9b64 Pavel Begunkov 2020-11-30  5563  	struct io_timeout_data *data;
47f467686ec02f Jens Axboe     2019-11-09  5564  
9c8e11b36c9b64 Pavel Begunkov 2020-11-30  5565  	if (IS_ERR(req))
9c8e11b36c9b64 Pavel Begunkov 2020-11-30 @5566  		return PTR_ERR(req);
47f467686ec02f Jens Axboe     2019-11-09  5567  
9c8e11b36c9b64 Pavel Begunkov 2020-11-30  5568  	req->timeout.off = 0; /* noseq */
9c8e11b36c9b64 Pavel Begunkov 2020-11-30  5569  	data = req->async_data;
9c8e11b36c9b64 Pavel Begunkov 2020-11-30  5570  	list_add_tail(&req->timeout.list, &ctx->timeout_list);
9c8e11b36c9b64 Pavel Begunkov 2020-11-30  5571  	hrtimer_init(&data->timer, CLOCK_MONOTONIC, mode);
9c8e11b36c9b64 Pavel Begunkov 2020-11-30  5572  	data->timer.function = io_timeout_fn;
9c8e11b36c9b64 Pavel Begunkov 2020-11-30  5573  	hrtimer_start(&data->timer, timespec64_to_ktime(*ts), mode);
9c8e11b36c9b64 Pavel Begunkov 2020-11-30  5574  	return 0;
47f467686ec02f Jens Axboe     2019-11-09  5575  }
47f467686ec02f Jens Axboe     2019-11-09  5576  

:::::: The code at line 5550 was first introduced by commit
:::::: fbd15848f3c13506253b6c5de0077a603947cb67 io_uring: restructure io_timeout_cancel()

:::::: TO: Pavel Begunkov <asml.silence@gmail.com>
:::::: CC: Jens Axboe <axboe@kernel.dk>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 28019 bytes --]

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

only message in thread, other threads:[~2021-06-22  1:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-22  1:47 fs/io_uring.c:5550 io_timeout_cancel() warn: passing a valid pointer to 'PTR_ERR' 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.