Linux Kernel Selftest development
 help / color / mirror / Atom feed
From: "Maxime Ripard" <mripard@kernel.org>
To: "David Gow" <davidgow@google.com>
Cc: kunit-dev@googlegroups.com, linux-kernel@vger.kernel.org,
	linux-kselftest@vger.kernel.org,
	"Brendan Higgins" <brendan.higgins@linux.dev>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Kees Cook" <kees@kernel.org>,
	"Matti Vaittinen" <mazziesaccount@gmail.com>,
	"Maxime Ripard" <mripard@kernel.org>,
	"Nico Pache" <npache@redhat.com>, "Rae Moar" <rmoar@google.com>,
	"Shuah Khan" <skhan@linuxfoundation.org>
Subject: Re: [PATCH] kunit: Device wrappers should also manage driver name
Date: Wed, 31 Jul 2024 08:34:58 +0000	[thread overview]
Message-ID: <938af9c931203f2d2cba5332be3e530b@kernel.org> (raw)
In-Reply-To: <20240731070207.3918687-1-davidgow@google.com>

On Wed, 31 Jul 2024 15:02:06 +0800, David Gow wrote:
> kunit_driver_create() accepts a name for the driver, but does not copy
> it, so if that name is either on the stack, or otherwise freed, we end
> up with a use-after-free when the driver is cleaned up.
> 
> Instead, strdup() the name, and manage it as another KUnit allocation.
> 
> [ ... ]

Reviewed-by: Maxime Ripard <mripard@kernel.org>

Thanks!
Maxime

  reply	other threads:[~2024-07-31  8:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-31  7:02 [PATCH] kunit: Device wrappers should also manage driver name David Gow
2024-07-31  8:34 ` Maxime Ripard [this message]
2024-08-02 17:28 ` Rae Moar
2024-08-06  0:22 ` Nico Pache
2024-08-06  2:05   ` David Gow

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=938af9c931203f2d2cba5332be3e530b@kernel.org \
    --to=mripard@kernel.org \
    --cc=brendan.higgins@linux.dev \
    --cc=davidgow@google.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=kees@kernel.org \
    --cc=kunit-dev@googlegroups.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=mazziesaccount@gmail.com \
    --cc=npache@redhat.com \
    --cc=rmoar@google.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