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: <202110182249.dpR4Okio-lkp@intel.com>
Date:   Mon, 18 Oct 2021 22:20:53 +0800
From:   kernel test robot <lkp@...el.com>
To:     Thomas Gleixner <tglx@...utronix.de>
Cc:     llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
        linux-kernel@...r.kernel.org,
        Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Subject: [rt-devel:linux-5.15.y-rt-rebase 88/154] mm/vmalloc.c:1884:17:
 error: variable 'cpu' set but not used

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git linux-5.15.y-rt-rebase
head:   a3db22d52bcddd44890e6aa1439c2dd2a61a5847
commit: 07df2fdc42f1aebf3ae015e135556146d5bd4106 [88/154] mm/vmalloc: Another preempt disable region which sucks
config: riscv-buildonly-randconfig-r005-20211018 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project d245f2e8597bfb52c34810a328d42b990e4af1a4)
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 riscv cross compiling tool for clang build
        # apt-get install binutils-riscv64-linux-gnu
        # https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git/commit/?id=07df2fdc42f1aebf3ae015e135556146d5bd4106
        git remote add rt-devel https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git
        git fetch --no-tags rt-devel linux-5.15.y-rt-rebase
        git checkout 07df2fdc42f1aebf3ae015e135556146d5bd4106
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=riscv 

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

All errors (new ones prefixed by >>):

>> mm/vmalloc.c:1884:17: error: variable 'cpu' set but not used [-Werror,-Wunused-but-set-variable]
           int node, err, cpu;
                          ^
   mm/vmalloc.c:1991:6: error: variable 'cpu' set but not used [-Werror,-Wunused-but-set-variable]
           int cpu;
               ^
   2 errors generated.


vim +/cpu +1884 mm/vmalloc.c

  1869	
  1870	/**
  1871	 * new_vmap_block - allocates new vmap_block and occupies 2^order pages in this
  1872	 *                  block. Of course pages number can't exceed VMAP_BBMAP_BITS
  1873	 * @order:    how many 2^order pages should be occupied in newly allocated block
  1874	 * @gfp_mask: flags for the page level allocator
  1875	 *
  1876	 * Return: virtual address in a newly allocated block or ERR_PTR(-errno)
  1877	 */
  1878	static void *new_vmap_block(unsigned int order, gfp_t gfp_mask)
  1879	{
  1880		struct vmap_block_queue *vbq;
  1881		struct vmap_block *vb;
  1882		struct vmap_area *va;
  1883		unsigned long vb_idx;
> 1884		int node, err, cpu;
  1885		void *vaddr;
  1886	
  1887		node = numa_node_id();
  1888	
  1889		vb = kmalloc_node(sizeof(struct vmap_block),
  1890				gfp_mask & GFP_RECLAIM_MASK, node);
  1891		if (unlikely(!vb))
  1892			return ERR_PTR(-ENOMEM);
  1893	
  1894		va = alloc_vmap_area(VMAP_BLOCK_SIZE, VMAP_BLOCK_SIZE,
  1895						VMALLOC_START, VMALLOC_END,
  1896						node, gfp_mask);
  1897		if (IS_ERR(va)) {
  1898			kfree(vb);
  1899			return ERR_CAST(va);
  1900		}
  1901	
  1902		vaddr = vmap_block_vaddr(va->va_start, 0);
  1903		spin_lock_init(&vb->lock);
  1904		vb->va = va;
  1905		/* At least something should be left free */
  1906		BUG_ON(VMAP_BBMAP_BITS <= (1UL << order));
  1907		vb->free = VMAP_BBMAP_BITS - (1UL << order);
  1908		vb->dirty = 0;
  1909		vb->dirty_min = VMAP_BBMAP_BITS;
  1910		vb->dirty_max = 0;
  1911		INIT_LIST_HEAD(&vb->free_list);
  1912	
  1913		vb_idx = addr_to_vb_idx(va->va_start);
  1914		err = xa_insert(&vmap_blocks, vb_idx, vb, gfp_mask);
  1915		if (err) {
  1916			kfree(vb);
  1917			free_vmap_area(va);
  1918			return ERR_PTR(err);
  1919		}
  1920	
  1921		cpu = get_cpu_light();
  1922		vbq = this_cpu_ptr(&vmap_block_queue);
  1923		spin_lock(&vbq->lock);
  1924		list_add_tail_rcu(&vb->free_list, &vbq->free);
  1925		spin_unlock(&vbq->lock);
  1926		put_cpu_light();
  1927	
  1928		return vaddr;
  1929	}
  1930	

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

Download attachment ".config.gz" of type "application/gzip" (34214 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ