lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <c418f925-b7df-da46-e4aa-f0d6af128490@intel.com>
Date:   Thu, 10 Feb 2022 16:07:00 +0800
From:   kernel test robot <yujie.liu@...el.com>
To:     Usama Arif <usama.arif@...edance.com>
CC:     <kbuild-all@...ts.01.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Jens Axboe <axboe@...nel.dk>
Subject: [axboe-block:for-5.18/io_uring 2/5] fs/io_uring.c:9406:9: warning:
 Uninitialized variable: ret [uninitvar]

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@...el.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ