Re: [PATCH] EDAC, ghes: Fix locking and memory barrier issues

From: Borislav Petkov
Date: Tue Nov 05 2019 - 09:58:31 EST


Just to hold down what we discussed on IRC.

On Tue, Nov 05, 2019 at 02:17:42PM +0000, Robert Richter wrote:
> Here the bypass:
>
> 1) Entering ghes_edac_register(), instance #1

That was a misunderstanding, I know what Robert means now.

> Right, there will be a parent device created for each instance. But an
> array is not required as this also can be part of the private data.
> Only some sort of list head is needed to collect them all.

Ok.

> I would rather avoid an own implementation of reference counting and
> also better switch from atomic_* to refcount_* which also provides
> range checks. There is no benefit doing this our own.
>
> Any objections here for the renaming and using the refcount API?

None.

Thx.

--
Regards/Gruss,
Boris.

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