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: <202204281931.WsLfU7aL-lkp@intel.com>
Date:   Thu, 28 Apr 2022 19:19:29 +0800
From:   kernel test robot <lkp@...el.com>
To:     David Howells <dhowells@...hat.com>
Cc:     kbuild-all@...ts.01.org,
        GNU/Weeb Mailing List <gwml@...r.gnuweeb.org>,
        linux-kernel@...r.kernel.org
Subject: [ammarfaizi2-block:dhowells/linux-fs/netfs-linked-list 39/45]
 fs/netfs/buffered_write.c:670 netfs_page_mkwrite() warn: unsigned 'ret' is
 never less than zero.

tree:   https://github.com/ammarfaizi2/linux-block dhowells/linux-fs/netfs-linked-list
head:   a20ca5707a9b524115f5ded439fed1f8e552dd6b
commit: 95f517db4cb2fbcfdabe76d0be06d75746958b0b [39/45] netfs: Allow buffered shared-writeable mmap through netfs_page_mkwrite()
config: i386-randconfig-m021 (https://download.01.org/0day-ci/archive/20220428/202204281931.WsLfU7aL-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.2.0-20) 11.2.0

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

smatch warnings:
fs/netfs/buffered_write.c:670 netfs_page_mkwrite() warn: unsigned 'ret' is never less than zero.

vim +/ret +670 fs/netfs/buffered_write.c

   640	
   641	/*
   642	 * Notification that a previously read-only page is about to become writable.
   643	 * Note that the caller indicates a single page of a multipage folio.
   644	 */
   645	vm_fault_t netfs_page_mkwrite(struct vm_fault *vmf)
   646	{
   647		struct netfs_dirty_region *region;
   648		struct folio *folio = page_folio(vmf->page);
   649		struct file *file = vmf->vma->vm_file;
   650		struct inode *inode = file_inode(file);
   651		struct netfs_i_context *ctx = netfs_i_context(inode);
   652		vm_fault_t ret = VM_FAULT_RETRY;
   653		int err;
   654		LIST_HEAD(spare_regions);
   655	
   656		_enter("%lx", folio->index);
   657	
   658		if (ctx->ops->validate_for_write(inode, file) < 0)
   659			return VM_FAULT_SIGBUS;
   660	
   661		sb_start_pagefault(inode->i_sb);
   662	
   663		if (folio_wait_writeback_killable(folio))
   664			goto out;
   665	
   666		if (folio_lock_killable(folio) < 0)
   667			goto out;
   668	
   669		ret = netfs_preallocate_regions(&spare_regions);
 > 670		if (ret < 0) {

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ