Linux Kernel Selftest development
 help / color / mirror / Atom feed
From: Markus Elfring <Markus.Elfring@web.de>
To: Tiezhu Yang <yangtiezhu@loongson.cn>, linux-kselftest@vger.kernel.org
Cc: linux-kernel@vger.kernel.org,
	Luis Chamberlain <mcgrof@kernel.org>,
	Shuah Khan <shuah@kernel.org>, Xuefeng Li <lixuefeng@loongson.cn>
Subject: Re: [PATCH 4/4] test_kmod: Avoid potential double free in trigger_config_run_type()
Date: Sat, 18 Apr 2020 19:23:07 +0200	[thread overview]
Message-ID: <53bf9145-db17-9123-2489-540eaf2733a6@web.de> (raw)

> It should set config->test_fs instead of config->test_driver as NULL
> after kfree_const(config->test_fs) to avoid potential double free.

I suggest to improve this change description.

* How do you think about a wording variant like the following?

  Reset the member “test_fs” of the test configuration after a call
  of the function “kfree_const” to a null pointer so that a double
  memory release will not be performed.

* Would you like to add the tag “Fixes”?

Regards,
Markus

             reply	other threads:[~2020-04-18 17:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-18 17:23 Markus Elfring [this message]
2020-04-20  1:07 ` [PATCH 4/4] test_kmod: Avoid potential double free in trigger_config_run_type() Tiezhu Yang
  -- strict thread matches above, loose matches on Subject: below --
2020-04-18  5:19 [PATCH 1/4] selftests: kmod: Use variable NAME in kmod_test_0001() Tiezhu Yang
2020-04-18  5:20 ` [PATCH 4/4] test_kmod: Avoid potential double free in trigger_config_run_type() Tiezhu Yang
2020-04-18  5:47   ` Luis Chamberlain

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=53bf9145-db17-9123-2489-540eaf2733a6@web.de \
    --to=markus.elfring@web.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=lixuefeng@loongson.cn \
    --cc=mcgrof@kernel.org \
    --cc=shuah@kernel.org \
    --cc=yangtiezhu@loongson.cn \
    /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