From: kernel test robot <lkp@intel.com>
To: Jinjie Ruan <ruanjinjie@huawei.com>,
brendan.higgins@linux.dev, davidgow@google.com,
skhan@linuxfoundation.org, dlatypov@google.com, rmoar@google.com,
janusz.krzysztofik@linux.intel.com,
linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
ruanjinjie@huawei.com
Subject: Re: [PATCH v3 4/4] kunit: test: Fix the possible memory leak in executor_test
Date: Wed, 27 Sep 2023 05:14:53 +0800 [thread overview]
Message-ID: <202309270433.wGmFRGjd-lkp@intel.com> (raw)
In-Reply-To: <20230922071020.2554677-5-ruanjinjie@huawei.com>
Hi Jinjie,
kernel test robot noticed the following build warnings:
[auto build test WARNING on linus/master]
[also build test WARNING on v6.6-rc3 next-20230926]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Jinjie-Ruan/kunit-Fix-missed-memory-release-in-kunit_free_suite_set/20230922-151243
base: linus/master
patch link: https://lore.kernel.org/r/20230922071020.2554677-5-ruanjinjie%40huawei.com
patch subject: [PATCH v3 4/4] kunit: test: Fix the possible memory leak in executor_test
config: powerpc-allyesconfig (https://download.01.org/0day-ci/archive/20230927/202309270433.wGmFRGjd-lkp@intel.com/config)
compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project.git 4a5ac14ee968ff0ad5d2cc1ffa0299048db4c88a)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20230927/202309270433.wGmFRGjd-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202309270433.wGmFRGjd-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from lib/kunit/executor.c:353:
>> lib/kunit/executor_test.c:278:4: warning: cast from 'void (*)(struct kunit_suite_set *)' to 'kunit_action_t *' (aka 'void (*)(void *)') converts to incompatible function type [-Wcast-function-type-strict]
278 | (kunit_action_t *)free_suite_set,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
vim +278 lib/kunit/executor_test.c
264
265 /* Use the resource API to register a call to free_suite_set.
266 * Since we never actually use the resource, it's safe to use on const data.
267 */
268 static void free_suite_set_at_end(struct kunit *test, const void *to_free)
269 {
270 if (!((struct kunit_suite_set *)to_free)->start)
271 return;
272
273 struct kunit_suite_set *free = kzalloc(sizeof(struct kunit_suite_set),
274 GFP_KERNEL);
275 *free = *(struct kunit_suite_set *)to_free;
276
277 kunit_add_action(test,
> 278 (kunit_action_t *)free_suite_set,
279 (void *)free);
280 }
281
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
prev parent reply other threads:[~2023-09-26 23:42 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-22 7:10 [PATCH v3 0/4] kunit: Fix some bugs in kunit Jinjie Ruan
2023-09-22 7:10 ` [PATCH v3 1/4] kunit: Fix missed memory release in kunit_free_suite_set() Jinjie Ruan
2023-09-22 7:47 ` David Gow
2023-09-22 7:10 ` [PATCH v3 2/4] kunit: Fix the wrong kfree of copy for kunit_filter_suites() Jinjie Ruan
2023-09-22 7:47 ` David Gow
2023-09-22 7:10 ` [PATCH v3 3/4] kunit: Fix possible memory leak in kunit_filter_suites() Jinjie Ruan
2023-09-22 7:47 ` David Gow
2023-09-22 7:10 ` [PATCH v3 4/4] kunit: test: Fix the possible memory leak in executor_test Jinjie Ruan
2023-09-22 7:47 ` David Gow
2023-09-26 21:14 ` 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=202309270433.wGmFRGjd-lkp@intel.com \
--to=lkp@intel.com \
--cc=brendan.higgins@linux.dev \
--cc=davidgow@google.com \
--cc=dlatypov@google.com \
--cc=janusz.krzysztofik@linux.intel.com \
--cc=kunit-dev@googlegroups.com \
--cc=linux-kselftest@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=rmoar@google.com \
--cc=ruanjinjie@huawei.com \
--cc=skhan@linuxfoundation.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