Re: [PATCH 2/9] EDAC/versalnet: Add NULL check for mci in remove_one_mc()

From: Borislav Petkov

Date: Wed Sep 02 2026 - 12:34:20 EST


On Tue, Aug 11, 2026 at 06:41:45PM +0530, Shubhrajyoti Datta wrote:
> The driver currently assumes that all 8 controllers are instantiated. However,
> Vivado allows users to enable only a subset of them. For example, if only 4
> controllers are enabled, only indices 0-3 will be populated with valid data
> structures. During rmmod, the driver attempts to remove all 8 controllers,
> including uninitialized entries, which can lead to a crash due to invalid memory
> access.

Yes, that's what I am looking for, thanks!

I would like to read a sane explanation and a use case how something can
happen so that when reading commit messages months and years from now, we all
know why the code was written this way.

Thx.

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette