[linux-stable-rc:linux-4.4.y 1992/2009] mm/slab_common.c:524:37: warning: format '%d' expects argument of type 'int', but argument 4 has type 'u64 {aka long long unsigned int}'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.4.y
head:   a44a0226e48694a1263c10fc528b76205127734e
commit: 39a78b1ec7dea2d4bae32b3a7326686f2822003a [1992/2009] mm: memcontrol: fix cgroup creation failure after many small jobs
config: arm64-defconfig (attached as .config)
compiler: aarch64-linux-gnu-gcc (Debian 5.4.0-6) 5.4.0 20160609
reproduce:
        wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout 39a78b1ec7dea2d4bae32b3a7326686f2822003a
        # save the attached .config to linux build tree
        make.cross ARCH=arm64 

All warnings (new ones prefixed by >>):

   mm/slab_common.c: In function 'memcg_create_kmem_cache':
>> mm/slab_common.c:524:37: warning: format '%d' expects argument of type 'int', but argument 4 has type 'u64 {aka long long unsigned int}' [-Wformat=]
     cache_name = kasprintf(GFP_KERNEL, "%s(%d:%s)", root_cache->name,
                                        ^

vim +524 mm/slab_common.c

2a4db7eb Vladimir Davydov 2015-02-12  508  	if (!memcg_kmem_is_active(memcg))
2a4db7eb Vladimir Davydov 2015-02-12  509  		goto out_unlock;
2a4db7eb Vladimir Davydov 2015-02-12  510  
f7ce3190 Vladimir Davydov 2015-02-12  511  	idx = memcg_cache_id(memcg);
f7ce3190 Vladimir Davydov 2015-02-12  512  	arr = rcu_dereference_protected(root_cache->memcg_params.memcg_caches,
f7ce3190 Vladimir Davydov 2015-02-12  513  					lockdep_is_held(&slab_mutex));
f7ce3190 Vladimir Davydov 2015-02-12  514  
d5b3cf71 Vladimir Davydov 2015-02-10  515  	/*
d5b3cf71 Vladimir Davydov 2015-02-10  516  	 * Since per-memcg caches are created asynchronously on first
d5b3cf71 Vladimir Davydov 2015-02-10  517  	 * allocation (see memcg_kmem_get_cache()), several threads can try to
d5b3cf71 Vladimir Davydov 2015-02-10  518  	 * create the same cache, but only one of them may succeed.
d5b3cf71 Vladimir Davydov 2015-02-10  519  	 */
f7ce3190 Vladimir Davydov 2015-02-12  520  	if (arr->entries[idx])
d5b3cf71 Vladimir Davydov 2015-02-10  521  		goto out_unlock;
d5b3cf71 Vladimir Davydov 2015-02-10  522  
f1008365 Vladimir Davydov 2015-02-12  523  	cgroup_name(css->cgroup, memcg_name_buf, sizeof(memcg_name_buf));
073ee1c6 Vladimir Davydov 2014-06-04 @524  	cache_name = kasprintf(GFP_KERNEL, "%s(%d:%s)", root_cache->name,
39a78b1e Johannes Weiner  2016-07-20  525  			       css->serial_nr, memcg_name_buf);
794b1248 Vladimir Davydov 2014-04-07  526  	if (!cache_name)
794b1248 Vladimir Davydov 2014-04-07  527  		goto out_unlock;
794b1248 Vladimir Davydov 2014-04-07  528  
c9a77a79 Vladimir Davydov 2015-11-05  529  	s = create_cache(cache_name, root_cache->object_size,
794b1248 Vladimir Davydov 2014-04-07  530  			 root_cache->size, root_cache->align,
794b1248 Vladimir Davydov 2014-04-07  531  			 root_cache->flags, root_cache->ctor,
794b1248 Vladimir Davydov 2014-04-07  532  			 memcg, root_cache);

:::::: The code at line 524 was first introduced by commit
:::::: 073ee1c6cd11cd190f4d0da84d9b4ba79d7b9e70 memcg: get rid of memcg_create_cache_name

:::::: TO: Vladimir Davydov <vdavydov@xxxxxxxxxxxxx>
:::::: CC: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: Binary data


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]