[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20230417124450.6a06686e@kernel.org>
Date: Mon, 17 Apr 2023 12:44:50 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Leon Romanovsky <leon@...nel.org>
Cc: davem@...emloft.net, netdev@...r.kernel.org, edumazet@...gle.com,
pabeni@...hat.com, saeedm@...dia.com
Subject: Re: [PATCH net-next] eth: mlx5: avoid iterator use outside of a
loop
On Sun, 16 Apr 2023 13:17:53 +0300 Leon Romanovsky wrote:
> > - return mlx5_irq_get_affinity_mask(eq->core.irq);
> > + WARN_ON_ONCE(1);
> > + return 0;
>
> I would do it without changing last return, but "return ERR_PTR(0);"
> will do the trick too.
Hm, I've not seen ERR_PTR(0) used before. I'll return NULL.
Looks like callers pass the value to cpumask_first() without checking
so either way the warning will be followed by a crash 🤷️
Powered by blists - more mailing lists