mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Markus Elfring <Markus.Elfring@web.de>
To: Qianfeng Rong <rongqianfeng@vivo.com>,
	nouveau@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	Danilo Krummrich <dakr@kernel.org>,
	Dave Airlie <airlied@redhat.com>, Lyude Paul <lyude@redhat.com>,
	Simona Vetter <simona@ffwll.ch>, Timur Tabi <ttabi@nvidia.com>,
	Zhi Wang <zhiw@nvidia.com>
Cc: LKML <linux-kernel@vger.kernel.org>, David Airlie <airlied@gmail.com>
Subject: Re: [PATCH v2] drm/nouveau/gsp: fix mismatched alloc/free for kvmalloc()
Date: Thu, 14 Aug 2025 14:41:07 +0200	[thread overview]
Message-ID: <a11bd516-7ebb-4865-9e19-394ee4a5be37@web.de> (raw)
In-Reply-To: <20250813125412.96178-1-rongqianfeng@vivo.com>

> Replace kfree() with kvfree() for memory allocated by kvmalloc().

* Would you like to improve the exception handling by using another goto chain?

* How do you think about to increase the application of scope-based resource management?
  https://elixir.bootlin.com/linux/v6.16/source/include/linux/slab.h#L1081


Is there a need to adjust also the following statement combination?
https://elixir.bootlin.com/linux/v6.16/source/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/rpc.c#L312-L314

…
		kvfree(info.gsp_rpc_buf);
		info.gsp_rpc_buf = NULL;
		return buf;
…


Regards,
Markus

  reply	other threads:[~2025-08-14 12:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-13 12:54 Qianfeng Rong
2025-08-14 12:41 ` Markus Elfring [this message]
2025-08-15 20:57 ` Danilo Krummrich

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=a11bd516-7ebb-4865-9e19-394ee4a5be37@web.de \
    --to=markus.elfring@web.de \
    --cc=airlied@gmail.com \
    --cc=airlied@redhat.com \
    --cc=dakr@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lyude@redhat.com \
    --cc=nouveau@lists.freedesktop.org \
    --cc=rongqianfeng@vivo.com \
    --cc=simona@ffwll.ch \
    --cc=ttabi@nvidia.com \
    --cc=zhiw@nvidia.com \
    /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

all inboxes | Powered by JetHome®