From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: lib/slub_kunit.c:82 test_first_word() error: dereferencing freed memory 'p'
Date: Sun, 05 Dec 2021 05:37:00 +0800 [thread overview]
Message-ID: <202112050504.lOFmsMEL-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 2238 bytes --]
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Oliver Glitta <glittao@gmail.com>
CC: Vlastimil Babka <vbabka@suse.cz>
CC: Andrew Morton <akpm@linux-foundation.org>
CC: Linux Memory Management List <linux-mm@kvack.org>
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/202112050504.lOFmsMEL-lkp(a)intel.com/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 <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
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/kbuild-all(a)lists.01.org
next reply other threads:[~2021-12-04 21:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-04 21:37 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-12-08 22:11 lib/slub_kunit.c:82 test_first_word() error: dereferencing freed memory 'p' kernel test robot
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=202112050504.lOFmsMEL-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild@lists.01.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.