[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202111070136.KoosIlBs-lkp@intel.com>
Date: Sun, 7 Nov 2021 01:31:49 +0800
From: kernel test robot <lkp@...el.com>
To: Vlastimil Babka <vbabka@...e.cz>
Cc: llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
linux-kernel@...r.kernel.org
Subject: [vbabka:slab-struct_slab-v1r8 33/33] mm/slub.c:5274:16: error: no
member named 'slabs' in 'struct slab'
tree: https://git.kernel.org/pub/scm/linux/kernel/git/vbabka/linux.git slab-struct_slab-v1r8
head: 1992ba7f38390cfa8290baf300243b7cf3bb6b44
commit: 1992ba7f38390cfa8290baf300243b7cf3bb6b44 [33/33] mm/sl*b: Differentiate struct slab fields by sl*b implementations
config: i386-buildonly-randconfig-r004-20211105 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 627868263cd4d57c230b61904483a3dad9e1a1da)
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/vbabka/linux.git/commit/?id=1992ba7f38390cfa8290baf300243b7cf3bb6b44
git remote add vbabka https://git.kernel.org/pub/scm/linux/kernel/git/vbabka/linux.git
git fetch --no-tags vbabka slab-struct_slab-v1r8
git checkout 1992ba7f38390cfa8290baf300243b7cf3bb6b44
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash
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/slub.c:5274:16: error: no member named 'slabs' in 'struct slab'
x = slab->slabs;
~~~~ ^
mm/slub.c:5481:19: error: no member named 'slabs' in 'struct slab'
slabs += slab->slabs;
~~~~ ^
>> mm/slub.c:5482:21: error: no member named 'pobjects' in 'struct slab'; did you mean 'objects'?
objects += slab->pobjects;
^~~~~~~~
objects
mm/slab.h:49:13: note: 'objects' declared here
unsigned objects:15;
^
3 errors generated.
vim +5274 mm/slub.c
81819f0fc8285a Christoph Lameter 2007-05-06 5230
62e5c4b4d63517 Cyrill Gorcunov 2008-03-02 5231 static ssize_t show_slab_objects(struct kmem_cache *s,
81819f0fc8285a Christoph Lameter 2007-05-06 5232 char *buf, unsigned long flags)
81819f0fc8285a Christoph Lameter 2007-05-06 5233 {
81819f0fc8285a Christoph Lameter 2007-05-06 5234 unsigned long total = 0;
81819f0fc8285a Christoph Lameter 2007-05-06 5235 int node;
81819f0fc8285a Christoph Lameter 2007-05-06 5236 int x;
81819f0fc8285a Christoph Lameter 2007-05-06 5237 unsigned long *nodes;
bf16d19aabd8f5 Joe Perches 2020-12-14 5238 int len = 0;
81819f0fc8285a Christoph Lameter 2007-05-06 5239
6396bb221514d2 Kees Cook 2018-06-12 5240 nodes = kcalloc(nr_node_ids, sizeof(unsigned long), GFP_KERNEL);
62e5c4b4d63517 Cyrill Gorcunov 2008-03-02 5241 if (!nodes)
62e5c4b4d63517 Cyrill Gorcunov 2008-03-02 5242 return -ENOMEM;
81819f0fc8285a Christoph Lameter 2007-05-06 5243
205ab99dd103e3 Christoph Lameter 2008-04-14 5244 if (flags & SO_CPU) {
205ab99dd103e3 Christoph Lameter 2008-04-14 5245 int cpu;
205ab99dd103e3 Christoph Lameter 2008-04-14 5246
81819f0fc8285a Christoph Lameter 2007-05-06 5247 for_each_possible_cpu(cpu) {
d0e0ac9772f8ec Chen Gang 2013-07-15 5248 struct kmem_cache_cpu *c = per_cpu_ptr(s->cpu_slab,
d0e0ac9772f8ec Chen Gang 2013-07-15 5249 cpu);
ec3ab083a7a004 Christoph Lameter 2012-05-09 5250 int node;
184d9494c1a4f5 Vlastimil Babka 2021-11-03 5251 struct slab *slab;slab = READ_ONCE(c->slab);
184d9494c1a4f5 Vlastimil Babka 2021-11-03 5252 if (!slab)
ec3ab083a7a004 Christoph Lameter 2012-05-09 5253 continue;
ec3ab083a7a004 Christoph Lameter 2012-05-09 5254
184d9494c1a4f5 Vlastimil Babka 2021-11-03 5255 node = slab_nid(slab);
205ab99dd103e3 Christoph Lameter 2008-04-14 5256 if (flags & SO_TOTAL)
184d9494c1a4f5 Vlastimil Babka 2021-11-03 5257 x = slab->objects;
205ab99dd103e3 Christoph Lameter 2008-04-14 5258 else if (flags & SO_OBJECTS)
184d9494c1a4f5 Vlastimil Babka 2021-11-03 5259 x = slab->inuse;
81819f0fc8285a Christoph Lameter 2007-05-06 5260 else
81819f0fc8285a Christoph Lameter 2007-05-06 5261 x = 1;
205ab99dd103e3 Christoph Lameter 2008-04-14 5262
81819f0fc8285a Christoph Lameter 2007-05-06 5263 total += x;
bc6697d8a506de Eric Dumazet 2011-11-22 5264 nodes[node] += x;
49e2258586b423 Christoph Lameter 2011-08-09 5265
184d9494c1a4f5 Vlastimil Babka 2021-11-03 5266 slab = slub_percpu_partial_read_once(c);
184d9494c1a4f5 Vlastimil Babka 2021-11-03 5267 if (slab) {
184d9494c1a4f5 Vlastimil Babka 2021-11-03 5268 node = slab_nid(slab);
8afb1474db4701 Li Zefan 2013-09-10 5269 if (flags & SO_TOTAL)
8afb1474db4701 Li Zefan 2013-09-10 5270 WARN_ON_ONCE(1);
8afb1474db4701 Li Zefan 2013-09-10 5271 else if (flags & SO_OBJECTS)
8afb1474db4701 Li Zefan 2013-09-10 5272 WARN_ON_ONCE(1);
8afb1474db4701 Li Zefan 2013-09-10 5273 else
184d9494c1a4f5 Vlastimil Babka 2021-11-03 @5274 x = slab->slabs;
49e2258586b423 Christoph Lameter 2011-08-09 5275 total += x;
bc6697d8a506de Eric Dumazet 2011-11-22 5276 nodes[node] += x;
49e2258586b423 Christoph Lameter 2011-08-09 5277 }
81819f0fc8285a Christoph Lameter 2007-05-06 5278 }
81819f0fc8285a Christoph Lameter 2007-05-06 5279 }
81819f0fc8285a Christoph Lameter 2007-05-06 5280
e4f8e513c3d353 Qian Cai 2019-10-14 5281 /*
e4f8e513c3d353 Qian Cai 2019-10-14 5282 * It is impossible to take "mem_hotplug_lock" here with "kernfs_mutex"
e4f8e513c3d353 Qian Cai 2019-10-14 5283 * already held which will conflict with an existing lock order:
e4f8e513c3d353 Qian Cai 2019-10-14 5284 *
e4f8e513c3d353 Qian Cai 2019-10-14 5285 * mem_hotplug_lock->slab_mutex->kernfs_mutex
e4f8e513c3d353 Qian Cai 2019-10-14 5286 *
e4f8e513c3d353 Qian Cai 2019-10-14 5287 * We don't really need mem_hotplug_lock (to hold off
e4f8e513c3d353 Qian Cai 2019-10-14 5288 * slab_mem_going_offline_callback) here because slab's memory hot
e4f8e513c3d353 Qian Cai 2019-10-14 5289 * unplug code doesn't destroy the kmem_cache->node[] data.
e4f8e513c3d353 Qian Cai 2019-10-14 5290 */
e4f8e513c3d353 Qian Cai 2019-10-14 5291
:::::: The code at line 5274 was first introduced by commit
:::::: 184d9494c1a4f53fc10a008317b03911a85597c3 mm/slub: mass conversion of struct page to struct slab by spatch
:::::: TO: Vlastimil Babka <vbabka@...e.cz>
:::::: CC: Vlastimil Babka <vbabka@...e.cz>
---
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" (44719 bytes)
Powered by blists - more mailing lists