Re: [PATCH] mm: add ___GFP_NOINIT flag which disables zeroing on alloc

From: kernel test robot
Date: Mon Mar 29 2021 - 05:48:21 EST


Hi Hyunsoon,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on v5.12-rc5]
[also build test WARNING on next-20210326]
[cannot apply to hnaz-linux-mm/master]
[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]

url: https://github.com/0day-ci/linux/commits/Hyunsoon-Kim/mm-add-___GFP_NOINIT-flag-which-disables-zeroing-on-alloc/20210329-134447
base: a5e13c6df0e41702d2b2c77c8ad41677ebb065b3
config: m68k-randconfig-s032-20210329 (attached as .config)
compiler: m68k-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-277-gc089cd2d-dirty
# https://github.com/0day-ci/linux/commit/e952189333dd008d07e0b80235f6e04a01c1e052
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Hyunsoon-Kim/mm-add-___GFP_NOINIT-flag-which-disables-zeroing-on-alloc/20210329-134447
git checkout e952189333dd008d07e0b80235f6e04a01c1e052
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=m68k

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>


sparse warnings: (new ones prefixed by >>)
net/core/sock.c: note: in included file (through include/linux/bvec.h, include/linux/skbuff.h, include/linux/ip.h, include/net/ip.h, ...):
>> include/linux/mm.h:2910:13: sparse: sparse: restricted gfp_t degrades to integer
net/core/sock.c:2011:9: sparse: sparse: context imbalance in 'sk_clone_lock' - wrong count at exit
net/core/sock.c:2015:6: sparse: sparse: context imbalance in 'sk_free_unlock_clone' - unexpected unlock
net/core/sock.c:3593:13: sparse: sparse: context imbalance in 'proto_seq_start' - wrong count at exit
net/core/sock.c:3605:13: sparse: sparse: context imbalance in 'proto_seq_stop' - wrong count at exit
--
init/main.c:291:16: sparse: sparse: cast to restricted __le32
init/main.c:291:16: sparse: sparse: cast to restricted __le32
init/main.c:291:16: sparse: sparse: cast to restricted __le32
init/main.c:291:16: sparse: sparse: cast to restricted __le32
init/main.c:291:16: sparse: sparse: cast to restricted __le32
init/main.c:291:16: sparse: sparse: cast to restricted __le32
init/main.c:292:16: sparse: sparse: cast to restricted __le32
init/main.c:292:16: sparse: sparse: cast to restricted __le32
init/main.c:292:16: sparse: sparse: cast to restricted __le32
init/main.c:292:16: sparse: sparse: cast to restricted __le32
init/main.c:292:16: sparse: sparse: cast to restricted __le32
init/main.c:292:16: sparse: sparse: cast to restricted __le32
init/main.c: note: in included file (through include/linux/ring_buffer.h, include/linux/trace_events.h, include/trace/syscall.h, ...):
>> include/linux/mm.h:2910:13: sparse: sparse: restricted gfp_t degrades to integer
--
mm/page_alloc.c: note: in included file:
>> include/linux/mm.h:2910:13: sparse: sparse: restricted gfp_t degrades to integer
mm/page_alloc.c: note: in included file (through include/linux/mm.h):
include/linux/gfp.h:343:27: sparse: sparse: restricted gfp_t degrades to integer

vim +2910 include/linux/mm.h

2906
2907 DECLARE_STATIC_KEY_FALSE(init_on_alloc);
2908 static inline bool want_init_on_alloc(gfp_t flags)
2909 {
> 2910 if (flags & ___GFP_NOINIT)
2911 return false;
2912 else if (static_branch_unlikely(&init_on_alloc))
2913 return true;
2914 return flags & __GFP_ZERO;
2915 }
2916

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip