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: <202110080931.I2SNh77a-lkp@intel.com>
Date:   Fri, 8 Oct 2021 09:42:33 +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 78/146] 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:   3aa1afc79f727541daded8d0b2438fdb98545540
commit: d9241af84a9794c7bc9a103ac4d882cbfbe22e92 [78/146] mm/vmalloc: Another preempt disable region which sucks
config: hexagon-buildonly-randconfig-r006-20211007 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 58b68e70ebf6308f982426a2618782f473218eed)
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/rt/linux-rt-devel.git/commit/?id=d9241af84a9794c7bc9a103ac4d882cbfbe22e92
        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 d9241af84a9794c7bc9a103ac4d882cbfbe22e92
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=hexagon 

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" (25918 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ