Re: [PATCH] memory: tegra: Guard against NULL mc_regs in IRQ handler

From: Krzysztof Kozlowski

Date: Wed Jul 08 2026 - 07:20:28 EST



On Fri, 03 Jul 2026 04:56:53 +0000, Ashish Mhetre wrote:
> The per-error decode in tegra30_mc_handle_irq() dereferences
> mc->soc->regs unconditionally. This 'regs' structure is optional and is
> only used for decoding and logging MC error interrupts. The rest of the
> MC functionality does not depend on it.
>
> When adding support for the Tegra238 SoC, the 'regs' structure was
> initially omitted because it is only used for error logging. We found
> that this resulted in a NULL pointer dereference in IRQ context, causing
> a crash when an MC error interrupt fired. Although existing upstream
> devices will not hit this condition because 'regs' is present, guard
> against it to improve the robustness of the driver.
>
> [...]

Applied, thanks!

[1/1] memory: tegra: Guard against NULL mc_regs in IRQ handler
https://git.kernel.org/krzk/linux-mem-ctrl/c/8111c7f3723f414b7f655a3880775cbbd0e9de8e

Best regards,
--
Krzysztof Kozlowski <krzk@xxxxxxxxxx>