[linux-next:master 6738/7206] mm/memcontrol.c:918:4: note: in expansion of macro 'cmpxchg'

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

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   f7ac28a6971b43a2ee8bb47c0ef931b38f7888cf
commit: c5be3a6f67e41646cfeb51e1e122934e744d36b1 [6738/7206] mm: memcontrol: fix possible memcg leak due to interrupted reclaim
config: m68k-allyesconfig (attached as .config)
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 c5be3a6f67e41646cfeb51e1e122934e744d36b1
        # save the attached .config to linux build tree
        make.cross ARCH=m68k 

All warnings (new ones prefixed by >>):

   In file included from arch/m68k/include/asm/atomic.h:6:0,
                    from include/linux/atomic.h:4,
                    from include/linux/page_counter.h:4,
                    from mm/memcontrol.c:34:
   mm/memcontrol.c: In function 'mem_cgroup_iter':
   arch/m68k/include/asm/cmpxchg.h:121:3: warning: value computed is not used [-Wunused-value]
     ((__typeof__(*(ptr)))__cmpxchg((ptr), (unsigned long)(o),     \
      ^
>> mm/memcontrol.c:918:4: note: in expansion of macro 'cmpxchg'
       cmpxchg(&iter->position, pos, NULL);
       ^
   arch/m68k/include/asm/cmpxchg.h:121:3: warning: value computed is not used [-Wunused-value]
     ((__typeof__(*(ptr)))__cmpxchg((ptr), (unsigned long)(o),     \
      ^
   mm/memcontrol.c:965:3: note: in expansion of macro 'cmpxchg'
      cmpxchg(&iter->position, pos, memcg);
      ^
   mm/memcontrol.c: In function 'invalidate_reclaim_iterators':
   arch/m68k/include/asm/cmpxchg.h:121:3: warning: value computed is not used [-Wunused-value]
     ((__typeof__(*(ptr)))__cmpxchg((ptr), (unsigned long)(o),     \
      ^
   mm/memcontrol.c:1017:6: note: in expansion of macro 'cmpxchg'
         cmpxchg(&iter->position,
         ^

vim +/cmpxchg +918 mm/memcontrol.c

   902	
   903			if (prev && reclaim->generation != iter->generation)
   904				goto out_unlock;
   905	
   906			while (1) {
   907				pos = READ_ONCE(iter->position);
   908				if (!pos || css_tryget(&pos->css))
   909					break;
   910				/*
   911				 * css reference reached zero, so iter->position will
   912				 * be cleared by ->css_released. However, we should not
   913				 * rely on this happening soon, because ->css_released
   914				 * is called from a work queue, and by busy-waiting we
   915				 * might block it. So we clear iter->position right
   916				 * away.
   917				 */
 > 918				cmpxchg(&iter->position, pos, NULL);
   919			}
   920		}
   921	
   922		if (pos)
   923			css = &pos->css;
   924	
   925		for (;;) {
   926			css = css_next_descendant_pre(css, &root->css);

---
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]