linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Lang Yu <lang.yu@amd.com>, linux-mm@kvack.org
Cc: kbuild-all@lists.01.org,
	Catalin Marinas <catalin.marinas@arm.com>,
	linux-kernel@vger.kernel.org, Lang Yu <lang.yu@amd.com>
Subject: Re: [PATCH] mm/kmemleak: Avoid scanning potential huge holes
Date: Sun, 7 Nov 2021 03:20:24 +0800	[thread overview]
Message-ID: <202111070320.aDXvejaB-lkp@intel.com> (raw)
In-Reply-To: <20211105035241.1239751-1-lang.yu@amd.com>

[-- Attachment #1: Type: text/plain, Size: 4539 bytes --]

Hi Lang,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on hnaz-mm/master]

url:    https://github.com/0day-ci/linux/commits/Lang-Yu/mm-kmemleak-Avoid-scanning-potential-huge-holes/20211105-115425
base:   https://github.com/hnaz/linux-mm master
config: xtensa-allyesconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 11.2.0
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/0day-ci/linux/commit/d455f236523de8c6b91774a74eb3163d2ff16e2e
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Lang-Yu/mm-kmemleak-Avoid-scanning-potential-huge-holes/20211105-115425
        git checkout d455f236523de8c6b91774a74eb3163d2ff16e2e
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=xtensa 

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

All errors (new ones prefixed by >>):

   mm/kmemleak.c: In function 'kmemleak_scan':
>> mm/kmemleak.c:1407:13: error: unused variable 'i' [-Werror=unused-variable]
    1407 |         int i;
         |             ^
   cc1: all warnings being treated as errors


vim +/i +1407 mm/kmemleak.c

04609ccc40c4e8 Catalin Marinas 2009-10-28  1396  
3c7b4e6b8be4c1 Catalin Marinas 2009-06-11  1397  /*
3c7b4e6b8be4c1 Catalin Marinas 2009-06-11  1398   * Scan data sections and all the referenced memory blocks allocated via the
3c7b4e6b8be4c1 Catalin Marinas 2009-06-11  1399   * kernel's standard allocators. This function must be called with the
3c7b4e6b8be4c1 Catalin Marinas 2009-06-11  1400   * scan_mutex held.
3c7b4e6b8be4c1 Catalin Marinas 2009-06-11  1401   */
3c7b4e6b8be4c1 Catalin Marinas 2009-06-11  1402  static void kmemleak_scan(void)
3c7b4e6b8be4c1 Catalin Marinas 2009-06-11  1403  {
3c7b4e6b8be4c1 Catalin Marinas 2009-06-11  1404  	unsigned long flags;
04609ccc40c4e8 Catalin Marinas 2009-10-28  1405  	struct kmemleak_object *object;
d455f236523de8 Lang Yu         2021-11-05  1406  	struct zone *zone;
3c7b4e6b8be4c1 Catalin Marinas 2009-06-11 @1407  	int i;
4698c1f2bbe44c Catalin Marinas 2009-06-26  1408  	int new_leaks = 0;
3c7b4e6b8be4c1 Catalin Marinas 2009-06-11  1409  
acf4968ec9dea4 Catalin Marinas 2009-06-26  1410  	jiffies_last_scan = jiffies;
acf4968ec9dea4 Catalin Marinas 2009-06-26  1411  
3c7b4e6b8be4c1 Catalin Marinas 2009-06-11  1412  	/* prepare the kmemleak_object's */
3c7b4e6b8be4c1 Catalin Marinas 2009-06-11  1413  	rcu_read_lock();
3c7b4e6b8be4c1 Catalin Marinas 2009-06-11  1414  	list_for_each_entry_rcu(object, &object_list, object_list) {
8c96f1bc6fc49c He Zhe          2020-01-30  1415  		raw_spin_lock_irqsave(&object->lock, flags);
3c7b4e6b8be4c1 Catalin Marinas 2009-06-11  1416  #ifdef DEBUG
3c7b4e6b8be4c1 Catalin Marinas 2009-06-11  1417  		/*
3c7b4e6b8be4c1 Catalin Marinas 2009-06-11  1418  		 * With a few exceptions there should be a maximum of
3c7b4e6b8be4c1 Catalin Marinas 2009-06-11  1419  		 * 1 reference to any object at this point.
3c7b4e6b8be4c1 Catalin Marinas 2009-06-11  1420  		 */
3c7b4e6b8be4c1 Catalin Marinas 2009-06-11  1421  		if (atomic_read(&object->use_count) > 1) {
ae281064be1643 Joe Perches     2009-06-23  1422  			pr_debug("object->use_count = %d\n",
3c7b4e6b8be4c1 Catalin Marinas 2009-06-11  1423  				 atomic_read(&object->use_count));
3c7b4e6b8be4c1 Catalin Marinas 2009-06-11  1424  			dump_object_info(object);
3c7b4e6b8be4c1 Catalin Marinas 2009-06-11  1425  		}
3c7b4e6b8be4c1 Catalin Marinas 2009-06-11  1426  #endif
3c7b4e6b8be4c1 Catalin Marinas 2009-06-11  1427  		/* reset the reference count (whiten the object) */
3c7b4e6b8be4c1 Catalin Marinas 2009-06-11  1428  		object->count = 0;
3c7b4e6b8be4c1 Catalin Marinas 2009-06-11  1429  		if (color_gray(object) && get_object(object))
3c7b4e6b8be4c1 Catalin Marinas 2009-06-11  1430  			list_add_tail(&object->gray_list, &gray_list);
3c7b4e6b8be4c1 Catalin Marinas 2009-06-11  1431  
8c96f1bc6fc49c He Zhe          2020-01-30  1432  		raw_spin_unlock_irqrestore(&object->lock, flags);
3c7b4e6b8be4c1 Catalin Marinas 2009-06-11  1433  	}
3c7b4e6b8be4c1 Catalin Marinas 2009-06-11  1434  	rcu_read_unlock();
3c7b4e6b8be4c1 Catalin Marinas 2009-06-11  1435  

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 69881 bytes --]

      parent reply	other threads:[~2021-11-06 19:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-05  3:52 [PATCH] mm/kmemleak: Avoid scanning potential huge holes Lang Yu
2021-11-05 13:14 ` David Hildenbrand
2021-11-08  7:27   ` Lang Yu
2021-11-08  8:23     ` David Hildenbrand
2021-11-08  9:06       ` Lang Yu
2021-11-08  9:24         ` David Hildenbrand
2021-11-08  9:44           ` Lang Yu
2021-11-06 19:20 ` kernel test robot [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202111070320.aDXvejaB-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=catalin.marinas@arm.com \
    --cc=kbuild-all@lists.01.org \
    --cc=lang.yu@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).