Subject: Re: [PATCH net-next v2 1/3] netpoll: Ensure clean state on setup failures

From: Breno Leitao <[email-masked]>
Date: Wed, 21 Aug 2024 01:44:25 -0700

Hello Jakub,

On Tue, Aug 20, 2024 at 04:20:10PM -0700, Jakub Kicinski wrote:
> On Mon, 19 Aug 2024 03:36:11 -0700 Breno Leitao wrote:
> > +	DEBUG_NET_WARN_ON_ONCE(np->dev);
> >  	if (ndev->priv_flags & IFF_DISABLE_NETPOLL) {
> >  		np_err(np, "%s doesn't support polling, aborting\n",
> > -		       np->dev_name);
> > +		       ndev->name);
> >  		err = -ENOTSUPP;
> >  		goto out;
> >  	}
> 
> >  put:
> > +	DEBUG_NET_WARN_ON_ONCE(np->dev);
> 
> nit: having two warnings feels a bit excessive, let's pick one location?

Sure, I think it might be better to keep it in the fail (put:) case, so,
we make sure that netpoll is in a clear state in the failure path.

Thanks
--breno