CC: [email protected]
CC: [email protected]
TO: Oliver Glitta <[email protected]>
CC: Vlastimil Babka <[email protected]>
CC: Andrew Morton <[email protected]>
CC: Linux Memory Management List <[email protected]>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   bbef3c7a63d2a4cb0f3f839db9e767f168c5e348
commit: 1f9f78b1b376f82cdd8ed73cc0abdb74d0453d43 mm/slub, kunit: add a KUnit 
test for SLUB debugging functionality
date:   5 months ago
:::::: branch date: 5 hours ago
:::::: commit date: 5 months ago
config: nios2-randconfig-m031-20211202 
(https://download.01.org/0day-ci/archive/20211205/[email protected]/config)
compiler: nios2-linux-gcc (GCC) 11.2.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email protected]>
Reported-by: Dan Carpenter <[email protected]>

smatch warnings:
lib/slub_kunit.c:82 test_first_word() error: dereferencing freed memory 'p'

vim +/p +82 lib/slub_kunit.c

1f9f78b1b376f8 Oliver Glitta 2021-06-28  74  
1f9f78b1b376f8 Oliver Glitta 2021-06-28  75  static void test_first_word(struct 
kunit *test)
1f9f78b1b376f8 Oliver Glitta 2021-06-28  76  {
1f9f78b1b376f8 Oliver Glitta 2021-06-28  77     struct kmem_cache *s = 
kmem_cache_create("TestSlub_1th_word_free", 64, 0,
1f9f78b1b376f8 Oliver Glitta 2021-06-28  78                             
SLAB_POISON, NULL);
1f9f78b1b376f8 Oliver Glitta 2021-06-28  79     u8 *p = kmem_cache_alloc(s, 
GFP_KERNEL);
1f9f78b1b376f8 Oliver Glitta 2021-06-28  80  
1f9f78b1b376f8 Oliver Glitta 2021-06-28  81     kmem_cache_free(s, p);
1f9f78b1b376f8 Oliver Glitta 2021-06-28 @82     *p = 0x78;
1f9f78b1b376f8 Oliver Glitta 2021-06-28  83  
1f9f78b1b376f8 Oliver Glitta 2021-06-28  84     validate_slab_cache(s);
1f9f78b1b376f8 Oliver Glitta 2021-06-28  85     KUNIT_EXPECT_EQ(test, 2, 
slab_errors);
1f9f78b1b376f8 Oliver Glitta 2021-06-28  86  
1f9f78b1b376f8 Oliver Glitta 2021-06-28  87     kmem_cache_destroy(s);
1f9f78b1b376f8 Oliver Glitta 2021-06-28  88  }
1f9f78b1b376f8 Oliver Glitta 2021-06-28  89  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]
_______________________________________________
kbuild mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to