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] [thread-next>] [day] [month] [year] [list]
Message-ID: <201804102116.2TH1yH5I%fengguang.wu@intel.com>
Date:   Tue, 10 Apr 2018 21:11:35 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Minchan Kim <minchan@...nel.org>
Cc:     kbuild-all@...org, Matthew Wilcox <willy@...radead.org>,
        Chao Yu <yuchao0@...wei.com>, Jaegeuk Kim <jaegeuk@...nel.org>,
        Christopher Lameter <cl@...ux.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        linux-mm <linux-mm@...ck.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Johannes Weiner <hannes@...xchg.org>, Jan Kara <jack@...e.cz>,
        Chris Fries <cfries@...gle.com>,
        linux-f2fs-devel@...ts.sourceforge.net,
        linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH v2] mm: workingset: fix NULL ptr dereference

Hi Minchan,

I love your patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v4.16 next-20180410]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Minchan-Kim/mm-workingset-fix-NULL-ptr-dereference/20180410-163500
config: i386-randconfig-a0-201814 (attached as .config)
compiler: gcc-4.9 (Debian 4.9.4-2) 4.9.4
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

   lib/radix-tree.c: In function 'radix_tree_preload':
>> lib/radix-tree.c:522:16: error: 'GFP_ZERO' undeclared (first use in this function)
      gfp_mask &= ~GFP_ZERO
                   ^
   lib/radix-tree.c:522:16: note: each undeclared identifier is reported only once for each function it appears in
   lib/radix-tree.c:524:2: error: expected ';' before 'return'
     return __radix_tree_preload(gfp_mask, RADIX_TREE_PRELOAD_SIZE);
     ^
   lib/radix-tree.c:525:1: warning: control reaches end of non-void function [-Wreturn-type]
    }
    ^

vim +/GFP_ZERO +522 lib/radix-tree.c

   500	
   501	/*
   502	 * Load up this CPU's radix_tree_node buffer with sufficient objects to
   503	 * ensure that the addition of a single element in the tree cannot fail.  On
   504	 * success, return zero, with preemption disabled.  On error, return -ENOMEM
   505	 * with preemption not disabled.
   506	 *
   507	 * To make use of this facility, the radix tree must be initialised without
   508	 * __GFP_DIRECT_RECLAIM being passed to INIT_RADIX_TREE().
   509	 */
   510	int radix_tree_preload(gfp_t gfp_mask)
   511	{
   512		/* Warn on non-sensical use... */
   513		WARN_ON_ONCE(!gfpflags_allow_blocking(gfp_mask));
   514		/*
   515		 * New allocate node must have node->private_list as INIT_LIST_HEAD
   516		 * state by workingset shadow memory implementation.
   517		 * If user pass  __GFP_ZERO by mistake, slab allocator will clear
   518		 * node->private_list, which makes a BUG. Rather than going Oops,
   519		 * just fix and warn about it.
   520		 */
   521		if (WARN_ON(gfp_mask & __GFP_ZERO))
 > 522			gfp_mask &= ~GFP_ZERO
   523	
   524		return __radix_tree_preload(gfp_mask, RADIX_TREE_PRELOAD_SIZE);
   525	}
   526	EXPORT_SYMBOL(radix_tree_preload);
   527	

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

Download attachment ".config.gz" of type "application/gzip" (31270 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ