Re: [PATCH] media: amphion: fix potential NULL deref in vpu_core_parse_dt()
From: Markus Elfring
Date: Sat Apr 12 2025 - 11:15:58 EST
> 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@xxxxxxxxxx/
Regards,
Markus