Messages in this thread | | | Date | Wed, 14 Feb 2018 20:35:47 +0100 | From | Borislav Petkov <> | Subject | Re: [PATCH 1/3] x86/MCE/AMD: Redo function to get SMCA bank type |
| |
On Wed, Feb 14, 2018 at 04:38:34PM +0000, Ghannam, Yazen wrote: > I know that we're declaring smca_banks[] to have MAX_NR_BANKS items. But > shouldn't we directly check that an index is within the bounds of the array? > We'll have a bug if we check against MAX_NR_BANKS and the definition of > smca_banks[] changes.
Then we don't need MAX_NR_BANKS. We either keep them in sync or kill it.
-- Regards/Gruss, Boris.
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg) --
| |