mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [axboe-block:for-5.18/io_uring 2/5] fs/io_uring.c:9406:9: warning: Uninitialized variable: ret [uninitvar]
       [not found] <202202060419.bpwBH36K-lkp@intel.com>
@ 2022-02-10  8:07 ` kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-02-10  8:07 UTC (permalink / raw)
  To: Usama Arif; +Cc: kbuild-all, Linux Kernel Mailing List, Jens Axboe

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-5.18/io_uring
head:   971d72eb476604fc91a8e82f0421e6f599f9c300
commit: b77e315a96445e5f19a83546c73d2abbcedfa5db [2/5] io_uring: avoid ring quiesce while registering/unregistering eventfd
compiler: riscv64-linux-gcc (GCC) 11.2.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <yujie.liu@intel.com>

cppcheck possible warnings: (new ones prefixed by >>, may not be real problems)

 >> fs/io_uring.c:9406:9: warning: Uninitialized variable: ret [uninitvar]
     return ret;
            ^

vim +9406 fs/io_uring.c

634d00df5e1cfc Pavel Begunkov 2021-04-25  9379
9b402849e80c85 Jens Axboe     2019-04-11  9380  static int io_eventfd_register(struct io_ring_ctx *ctx, void __user *arg)
9b402849e80c85 Jens Axboe     2019-04-11  9381  {
b77e315a96445e Usama Arif     2022-02-04  9382  	struct io_ev_fd *ev_fd;
9b402849e80c85 Jens Axboe     2019-04-11  9383  	__s32 __user *fds = arg;
b77e315a96445e Usama Arif     2022-02-04  9384  	int fd, ret;
9b402849e80c85 Jens Axboe     2019-04-11  9385
b77e315a96445e Usama Arif     2022-02-04  9386  	ev_fd = rcu_dereference_protected(ctx->io_ev_fd,
b77e315a96445e Usama Arif     2022-02-04  9387  					lockdep_is_held(&ctx->uring_lock));
b77e315a96445e Usama Arif     2022-02-04  9388  	if (ev_fd)
9b402849e80c85 Jens Axboe     2019-04-11  9389  		return -EBUSY;
9b402849e80c85 Jens Axboe     2019-04-11  9390
9b402849e80c85 Jens Axboe     2019-04-11  9391  	if (copy_from_user(&fd, fds, sizeof(*fds)))
9b402849e80c85 Jens Axboe     2019-04-11  9392  		return -EFAULT;
9b402849e80c85 Jens Axboe     2019-04-11  9393
b77e315a96445e Usama Arif     2022-02-04  9394  	ev_fd = kmalloc(sizeof(*ev_fd), GFP_KERNEL);
b77e315a96445e Usama Arif     2022-02-04  9395  	if (!ev_fd)
b77e315a96445e Usama Arif     2022-02-04  9396  		return -ENOMEM;
fe7e3257502991 Pavel Begunkov 2021-06-24  9397
b77e315a96445e Usama Arif     2022-02-04  9398  	ev_fd->cq_ev_fd = eventfd_ctx_fdget(fd);
b77e315a96445e Usama Arif     2022-02-04  9399  	if (IS_ERR(ev_fd->cq_ev_fd)) {
b77e315a96445e Usama Arif     2022-02-04  9400  		ret = PTR_ERR(ev_fd->cq_ev_fd);
b77e315a96445e Usama Arif     2022-02-04  9401  		kfree(ev_fd);
9b402849e80c85 Jens Axboe     2019-04-11  9402  		return ret;
9b402849e80c85 Jens Axboe     2019-04-11  9403  	}
9b402849e80c85 Jens Axboe     2019-04-11  9404
b77e315a96445e Usama Arif     2022-02-04  9405  	rcu_assign_pointer(ctx->io_ev_fd, ev_fd);
b77e315a96445e Usama Arif     2022-02-04 @9406  	return ret;
b77e315a96445e Usama Arif     2022-02-04  9407  }
b77e315a96445e Usama Arif     2022-02-04  9408

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

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

only message in thread, other threads:[~2022-02-10  8:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <202202060419.bpwBH36K-lkp@intel.com>
2022-02-10  8:07 ` [axboe-block:for-5.18/io_uring 2/5] fs/io_uring.c:9406:9: warning: Uninitialized variable: ret [uninitvar] kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®