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]
Message-ID: <202209131806.VIOWZicc-lkp@intel.com>
Date:   Tue, 13 Sep 2022 18:12:29 +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: io_uring/rw.c:215 io_fixup_rw_res() warn: unsigned 'res' is never
 less than zero.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   e839a756012b6cad7a4eeb67b0598ac3f349f863
commit: 4d9cb92ca41dd8e905a4569ceba4716c2f39c75a io_uring/rw: fix short rw error handling
date:   4 days ago
config: x86_64-randconfig-m001
compiler: gcc-11 (Debian 11.3.0-5) 11.3.0

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

smatch warnings:
io_uring/rw.c:215 io_fixup_rw_res() warn: unsigned 'res' is never less than zero.

vim +/res +215 io_uring/rw.c

   208	
   209	static inline unsigned io_fixup_rw_res(struct io_kiocb *req, unsigned res)
   210	{
   211		struct io_async_rw *io = req->async_data;
   212	
   213		/* add previously done IO, if any */
   214		if (req_has_async_data(req) && io->bytes_done > 0) {
 > 215			if (res < 0)
   216				res = io->bytes_done;
   217			else
   218				res += io->bytes_done;
   219		}
   220		return res;
   221	}
   222	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

View attachment "config" of type "text/plain" (121921 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ