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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Sat, 1 Jan 2022 18:54:24 +0800
From:   kernel test robot <lkp@...el.com>
To:     Pavel Begunkov <asml.silence@...il.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Jens Axboe <axboe@...nel.dk>
Subject: fs/io_uring.c:2330:40: warning: variable 'prev' set but not used

Hi Pavel,

FYI, the error/warning still remains.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   8008293888188c3923f5bd8a69370dae25ed14e5
commit: 6f33b0bc4ea43f5c5ce7b7c9ab66051f80837862 io_uring: use slist for completion batching
date:   2 months ago
config: nios2-defconfig (https://download.01.org/0day-ci/archive/20220101/202201011808.Lm6C3RMA-lkp@intel.com/config)
compiler: nios2-linux-gcc (GCC) 11.2.0
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
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6f33b0bc4ea43f5c5ce7b7c9ab66051f80837862
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 6f33b0bc4ea43f5c5ce7b7c9ab66051f80837862
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=nios2 SHELL=/bin/bash

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

All warnings (new ones prefixed by >>):

   fs/io_uring.c: In function 'io_queue_async_work':
   fs/io_uring.c:1455:61: warning: parameter 'locked' set but not used [-Wunused-but-set-parameter]
    1455 | static void io_queue_async_work(struct io_kiocb *req, bool *locked)
         |                                                       ~~~~~~^~~~~~
   fs/io_uring.c: In function '__io_submit_flush_completions':
>> fs/io_uring.c:2330:40: warning: variable 'prev' set but not used [-Wunused-but-set-variable]
    2330 |         struct io_wq_work_node *node, *prev;
         |                                        ^~~~


vim +/prev +2330 fs/io_uring.c

  2326	
  2327	static void __io_submit_flush_completions(struct io_ring_ctx *ctx)
  2328		__must_hold(&ctx->uring_lock)
  2329	{
> 2330		struct io_wq_work_node *node, *prev;
  2331		struct io_submit_state *state = &ctx->submit_state;
  2332		struct req_batch rb;
  2333	
  2334		spin_lock(&ctx->completion_lock);
  2335		wq_list_for_each(node, prev, &state->compl_reqs) {
  2336			struct io_kiocb *req = container_of(node, struct io_kiocb,
  2337							    comp_list);
  2338	
  2339			__io_cqring_fill_event(ctx, req->user_data, req->result,
  2340						req->compl.cflags);
  2341		}
  2342		io_commit_cqring(ctx);
  2343		spin_unlock(&ctx->completion_lock);
  2344		io_cqring_ev_posted(ctx);
  2345	
  2346		io_init_req_batch(&rb);
  2347		node = state->compl_reqs.first;
  2348		do {
  2349			struct io_kiocb *req = container_of(node, struct io_kiocb,
  2350							    comp_list);
  2351	
  2352			node = req->comp_list.next;
  2353			if (req_ref_put_and_test(req))
  2354				io_req_free_batch(&rb, req, &ctx->submit_state);
  2355		} while (node);
  2356	
  2357		io_req_free_batch_finish(ctx, &rb);
  2358		INIT_WQ_LIST(&state->compl_reqs);
  2359	}
  2360	

---
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