Re: [PATCH v2] x86/amd_node: Fix PCI device reference counting in amd_smn_init()
From: Borislav Petkov
Date: Fri Sep 11 2026 - 13:34:42 EST
On Fri, Sep 11, 2026 at 11:33:56AM -0500, Serge Hallyn wrote:
> May not be worth it, but should we also add a num_nodes == 0 or
> ZERO_OR_NULL_PTR(amd_roots) check, in case as code churns we
> end up with another way for amd_num_nodes() to return 0?
Thought about it... then looked at all kzalloc_objs() callers and how they're
not protecting against that. So yeah, before this turns into a whack-a-mole
game I'd say let's remain conservative and see what happens first...
Thx.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette