Re: [PATCH v3 1/2] mm: memcontrol: protect the memory in cgroup from being oom killed

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

 



Hi chengkaitao,

kernel test robot noticed the following build warnings:

[auto build test WARNING on akpm-mm/mm-everything]
[also build test WARNING on tj-cgroup/for-next linus/master v6.3 next-20230505]
[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/chengkaitao/mm-memcontrol-protect-the-memory-in-cgroup-from-being-oom-killed/20230506-195043
base:   https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
patch link:    https://lore.kernel.org/r/20230506114948.6862-2-chengkaitao%40didiglobal.com
patch subject: [PATCH v3 1/2] mm: memcontrol: protect the memory in cgroup from being oom killed
config: i386-randconfig-a011-20230501 (https://download.01.org/0day-ci/archive/20230506/202305062204.ob5SRKVX-lkp@xxxxxxxxx/config)
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/a2779b308166286f77728f04043cb7a17a16dd46
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review chengkaitao/mm-memcontrol-protect-the-memory-in-cgroup-from-being-oom-killed/20230506-195043
        git checkout a2779b308166286f77728f04043cb7a17a16dd46
        # 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=i386 olddefconfig
        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 where applicable
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Link: https://lore.kernel.org/oe-kbuild-all/202305062204.ob5SRKVX-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

>> mm/page_counter.c:44:36: warning: overflow in expression; result is -2147483648 with type 'long' [-Winteger-overflow]
           if (protected == PAGE_COUNTER_MAX + 1)
                                             ^
   1 warning generated.
--
   mm/memcontrol.c:1739:2: error: implicit declaration of function 'seq_buf_do_printk' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
           seq_buf_do_printk(&s, KERN_INFO);
           ^
>> mm/memcontrol.c:6445:37: warning: overflow in expression; result is -2147483648 with type 'long' [-Winteger-overflow]
           else if (value == PAGE_COUNTER_MAX + 1)
                                              ^
   mm/memcontrol.c:6743:34: warning: overflow in expression; result is -2147483648 with type 'long' [-Winteger-overflow]
                   oom_protect = PAGE_COUNTER_MAX + 1;
                                                  ^
   2 warnings and 1 error generated.


vim +/long +44 mm/page_counter.c

    15	
    16	static void propagate_protected_usage(struct page_counter *c,
    17					      unsigned long usage)
    18	{
    19		unsigned long protected, old_protected;
    20		long delta;
    21	
    22		if (!c->parent)
    23			return;
    24	
    25		protected = min(usage, READ_ONCE(c->min));
    26		old_protected = atomic_long_read(&c->min_usage);
    27		if (protected != old_protected) {
    28			old_protected = atomic_long_xchg(&c->min_usage, protected);
    29			delta = protected - old_protected;
    30			if (delta)
    31				atomic_long_add(delta, &c->parent->children_min_usage);
    32		}
    33	
    34		protected = min(usage, READ_ONCE(c->low));
    35		old_protected = atomic_long_read(&c->low_usage);
    36		if (protected != old_protected) {
    37			old_protected = atomic_long_xchg(&c->low_usage, protected);
    38			delta = protected - old_protected;
    39			if (delta)
    40				atomic_long_add(delta, &c->parent->children_low_usage);
    41		}
    42	
    43		protected = READ_ONCE(c->oom_protect);
  > 44		if (protected == PAGE_COUNTER_MAX + 1)
    45			protected = atomic_long_read(&c->children_oom_protect_usage);
    46		else
    47			protected = min(usage, protected);
    48		old_protected = atomic_long_read(&c->oom_protect_usage);
    49		if (protected != old_protected) {
    50			old_protected = atomic_long_xchg(&c->oom_protect_usage, protected);
    51			delta = protected - old_protected;
    52			if (delta)
    53				atomic_long_add(delta, &c->parent->children_oom_protect_usage);
    54		}
    55	}
    56	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests



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

  Powered by Linux