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>] [<thread-prev] [day] [month] [year] [list]
Date:   Tue, 25 Oct 2022 16:01:10 +0800
From:   kernel test robot <lkp@...el.com>
To:     Liu Shixin <liushixin2@...wei.com>,
        Christoph Lameter <cl@...ux-foundation.org>,
        Pekka Enberg <penberg@...nel.org>,
        David Rientjes <rientjes@...gle.com>,
        Joonsoo Kim <iamjoonsoo.kim@....com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Vlastimil Babka <vbabka@...e.cz>,
        Roman Gushchin <roman.gushchin@...ux.dev>,
        Hyeonggon Yoo <42.hyeyoo@...il.com>
Cc:     llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
        Linux Memory Management List <linux-mm@...ck.org>,
        linux-kernel@...r.kernel.org, Liu Shixin <liushixin2@...wei.com>
Subject: Re: [PATCH 3/4] mm/slab_common: Separate sysfs_slab_add() and
 debugfs_slab_add() from __kmem_cache_create()

Hi Liu,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on vbabka-slab/for-next]
[also build test ERROR on linus/master v6.1-rc2 next-20221024]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Liu-Shixin/Refactor-__kmem_cache_create-and-fix-memory-leak/20221024-145607
base:   git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab.git for-next
patch link:    https://lore.kernel.org/r/20221024074232.151383-4-liushixin2%40huawei.com
patch subject: [PATCH 3/4] mm/slab_common: Separate sysfs_slab_add() and debugfs_slab_add() from __kmem_cache_create()
config: x86_64-randconfig-a005-20221024
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
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://github.com/intel-lab-lkp/linux/commit/b431907fc9bd145502e0bdb34fcb4b1b67770f2a
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Liu-Shixin/Refactor-__kmem_cache_create-and-fix-memory-leak/20221024-145607
        git checkout b431907fc9bd145502e0bdb34fcb4b1b67770f2a
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash

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

All errors (new ones prefixed by >>):

>> mm/slab_common.c:239:9: error: implicit declaration of function 'sysfs_slab_add' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
                   err = sysfs_slab_add(s);
                         ^
>> mm/slab_common.c:244:3: error: implicit declaration of function 'debugfs_slab_add' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
                   debugfs_slab_add(s);
                   ^
   mm/slab_common.c:244:3: note: did you mean 'sysfs_slab_add'?
   mm/slab_common.c:239:9: note: 'sysfs_slab_add' declared here
                   err = sysfs_slab_add(s);
                         ^
   2 errors generated.


vim +/sysfs_slab_add +239 mm/slab_common.c

   204	
   205	static struct kmem_cache *create_cache(const char *name,
   206			unsigned int object_size, unsigned int align,
   207			slab_flags_t flags, unsigned int useroffset,
   208			unsigned int usersize, void (*ctor)(void *),
   209			struct kmem_cache *root_cache)
   210	{
   211		struct kmem_cache *s;
   212		const char *cache_name;
   213		int err = -ENOMEM;
   214	
   215		if (WARN_ON(useroffset + usersize > object_size))
   216			useroffset = usersize = 0;
   217	
   218		s = kmem_cache_zalloc(kmem_cache, GFP_KERNEL);
   219		if (!s)
   220			return ERR_PTR(err);
   221	
   222		cache_name = kstrdup_const(name, GFP_KERNEL);
   223		if (!cache_name)
   224			goto out_free_cache;
   225	
   226		s->name = cache_name;
   227		s->size = s->object_size = object_size;
   228		s->align = align;
   229		s->ctor = ctor;
   230		s->useroffset = useroffset;
   231		s->usersize = usersize;
   232	
   233		err = __kmem_cache_create(s, flags);
   234		if (err)
   235			goto out_free_name;
   236	
   237		/* Mutex is not taken during early boot */
   238		if (slab_state >= FULL) {
 > 239			err = sysfs_slab_add(s);
   240			if (err) {
   241				slab_kmem_cache_release(s);
   242				return ERR_PTR(err);
   243			}
 > 244			debugfs_slab_add(s);
   245		}
   246	
   247		s->refcount = 1;
   248		list_add(&s->list, &slab_caches);
   249		return s;
   250	
   251	out_free_name:
   252		kfree_const(s->name);
   253	out_free_cache:
   254		kmem_cache_free(kmem_cache, s);
   255		return ERR_PTR(err);
   256	}
   257	

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

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ