public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Markus Elfring <Markus.Elfring@web.de>
To: Chenyuan Yang <chenyuan0y@gmail.com>, linux-media@vger.kernel.org
Cc: LKML <linux-kernel@vger.kernel.org>,
	Charles Han <hanchunchao@inspur.com>,
	Hans Verkuil <hverkuil@xs4all.nl>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Ming Qian <ming.qian@nxp.com>,
	Nicolas Dufresne <nicolas@ndufresne.ca>,
	Shijie Qin <shijie.qin@nxp.com>, Zhou Peng <eagle.zhou@nxp.com>
Subject: Re: [PATCH] media: amphion: fix potential NULL deref in vpu_core_parse_dt()
Date: Sat, 12 Apr 2025 17:15:33 +0200	[thread overview]
Message-ID: <23cfd97e-b520-4e9c-a193-e0fdc885e299@web.de> (raw)
In-Reply-To: <20250411184356.2910366-1-chenyuan0y@gmail.com>

> The result of memremap() may be NULL on failure, leading to a null
> dereference in the subsequent memset(). Add explicit checks after
> each memremap() call: if the firmware region fails to map, return
> immediately; if the RPC region fails, unmap the firmware window before
> returning.

* Do you propose to complete the error handling?

* Can any other summary phrase variant become more desirable accordingly?

* Please avoid duplicate source code (also for corresponding exception handling).


See also:
[PATCH] media: amphion: fix potential NULL deref in vpu_core_parse_dt
https://lore.kernel.org/all/20250407084829.5755-1-hanchunchao@inspur.com/

Regards,
Markus

  parent reply	other threads:[~2025-04-12 15:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-11 18:43 [PATCH] media: amphion: fix potential NULL deref in vpu_core_parse_dt() Chenyuan Yang
2025-04-11 21:20 ` Nicolas Dufresne
2025-04-22 21:13   ` Nicolas Dufresne
2025-04-23  7:19     ` [EXT] " Ming Qian
2025-04-12 15:15 ` Markus Elfring [this message]
2025-04-22 21:16   ` Nicolas Dufresne

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=23cfd97e-b520-4e9c-a193-e0fdc885e299@web.de \
    --to=markus.elfring@web.de \
    --cc=chenyuan0y@gmail.com \
    --cc=eagle.zhou@nxp.com \
    --cc=hanchunchao@inspur.com \
    --cc=hverkuil@xs4all.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=ming.qian@nxp.com \
    --cc=nicolas@ndufresne.ca \
    --cc=shijie.qin@nxp.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