Re: [PATCH v2 3/3] kasan: fix krealloc handling for tag-based mode

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

 



Hi Andrey,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on next-20190102]
[cannot apply to v4.20]
[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/Andrey-Konovalov/kasan-tag-based-mode-fixes/20190103-050707
config: x86_64-randconfig-x016-201900 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All warnings (new ones prefixed by >>):

   mm/kasan/common.c: In function 'kasan_krealloc':
>> mm/kasan/common.c:525:3: warning: ignoring return value of 'kasan_kmalloc_large', declared with attribute warn_unused_result [-Wunused-result]
      kasan_kmalloc_large(object, size, flags);
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> mm/kasan/common.c:527:3: warning: ignoring return value of 'kasan_kmalloc', declared with attribute warn_unused_result [-Wunused-result]
      kasan_kmalloc(page->slab_cache, object, size, flags, true);
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

vim +/kasan_kmalloc_large +525 mm/kasan/common.c

   514	
   515	void kasan_krealloc(const void *object, size_t size, gfp_t flags)
   516	{
   517		struct page *page;
   518	
   519		if (unlikely(object == ZERO_SIZE_PTR))
   520			return;
   521	
   522		page = virt_to_head_page(object);
   523	
   524		if (unlikely(!PageSlab(page)))
 > 525			kasan_kmalloc_large(object, size, flags);
   526		else
 > 527			kasan_kmalloc(page->slab_cache, object, size, flags, true);
   528	}
   529	

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

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux