Subject: Re: [PATCH net v2] devlink: Delay health recover notification until devlink registered

From: Jakub Kicinski <[email-masked]>
Date: Fri, 11 Aug 2023 15:14:03 -0700

On Fri, 11 Aug 2023 14:42:31 -0700 Jakub Kicinski wrote:
> > Limiting the creation of health reporter only when instance is
> > registered does not seem like a good solution to me.
> > 
> > As with any other object, we postpone the notifications only after
> > register is done, that sounds fine, doesn't it?  
> 
> No, it doesn't. Registering health reporters on a semi-initialized
> device is a major foot gun, we should not allow this unless really
> necessary.

FWIW I mean that the recovery may race with the init and try to access
things which aren't set up yet. Could lead to deadlocks or crashes at
worst and sprinkling of "if (!initialized) return;" at best.
All the same problems we had before reload was put under the instance
lock basically.