public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Usama Arif <usama.arif@bytedance.com>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
	GNU/Weeb Mailing List <gwml@vger.gnuweeb.org>,
	linux-kernel@vger.kernel.org, Jens Axboe <axboe@kernel.dk>
Subject: [ammarfaizi2-block:axboe/linux-block/for-next 2/27] fs/io_uring.c:9406:9: error: variable 'ret' is uninitialized when used here
Date: Mon, 14 Feb 2022 07:13:53 +0800	[thread overview]
Message-ID: <202202140741.cSdNc5dQ-lkp@intel.com> (raw)

tree:   https://github.com/ammarfaizi2/linux-block axboe/linux-block/for-next
head:   9c63ffcf47865ad2d20e09d6d6531c4611674cf1
commit: 1a75fac9a0f920a13418c88e4deaa9aa005381f5 [2/27] io_uring: avoid ring quiesce while registering/unregistering eventfd
config: arm-randconfig-c002-20220213 (https://download.01.org/0day-ci/archive/20220214/202202140741.cSdNc5dQ-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project ea071884b0cc7210b3cc5fe858f0e892a779a23b)
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
        # install arm cross compiling tool for clang build
        # apt-get install binutils-arm-linux-gnueabi
        # https://github.com/ammarfaizi2/linux-block/commit/1a75fac9a0f920a13418c88e4deaa9aa005381f5
        git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block
        git fetch --no-tags ammarfaizi2-block axboe/linux-block/for-next
        git checkout 1a75fac9a0f920a13418c88e4deaa9aa005381f5
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash

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

Note: the ammarfaizi2-block/axboe/linux-block/for-next HEAD 9c63ffcf47865ad2d20e09d6d6531c4611674cf1 builds fine.
      It only hurts bisectability.

All errors (new ones prefixed by >>):

>> fs/io_uring.c:9406:9: error: variable 'ret' is uninitialized when used here [-Werror,-Wuninitialized]
           return ret;
                  ^~~
   fs/io_uring.c:9384:13: note: initialize the variable 'ret' to silence this warning
           int fd, ret;
                      ^
                       = 0
   1 error generated.


vim +/ret +9406 fs/io_uring.c

  9379	
  9380	static int io_eventfd_register(struct io_ring_ctx *ctx, void __user *arg)
  9381	{
  9382		struct io_ev_fd *ev_fd;
  9383		__s32 __user *fds = arg;
  9384		int fd, ret;
  9385	
  9386		ev_fd = rcu_dereference_protected(ctx->io_ev_fd,
  9387						lockdep_is_held(&ctx->uring_lock));
  9388		if (ev_fd)
  9389			return -EBUSY;
  9390	
  9391		if (copy_from_user(&fd, fds, sizeof(*fds)))
  9392			return -EFAULT;
  9393	
  9394		ev_fd = kmalloc(sizeof(*ev_fd), GFP_KERNEL);
  9395		if (!ev_fd)
  9396			return -ENOMEM;
  9397	
  9398		ev_fd->cq_ev_fd = eventfd_ctx_fdget(fd);
  9399		if (IS_ERR(ev_fd->cq_ev_fd)) {
  9400			ret = PTR_ERR(ev_fd->cq_ev_fd);
  9401			kfree(ev_fd);
  9402			return ret;
  9403		}
  9404	
  9405		rcu_assign_pointer(ctx->io_ev_fd, ev_fd);
> 9406		return ret;
  9407	}
  9408	

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

                 reply	other threads:[~2022-02-13 23:14 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202202140741.cSdNc5dQ-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=axboe@kernel.dk \
    --cc=gwml@vger.gnuweeb.org \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=usama.arif@bytedance.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox