[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240910150337.6c397227@kernel.org>
Date: Tue, 10 Sep 2024 15:03:37 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Paolo Abeni <pabeni@...hat.com>
Cc: netdev@...r.kernel.org, Jiri Pirko <jiri@...nulli.us>, Madhu Chittim
<madhu.chittim@...el.com>, Sridhar Samudrala <sridhar.samudrala@...el.com>,
Simon Horman <horms@...nel.org>, John Fastabend <john.fastabend@...il.com>,
Sunil Kovvuri Goutham <sgoutham@...vell.com>, Jamal Hadi Salim
<jhs@...atatu.com>, Donald Hunter <donald.hunter@...il.com>,
anthony.l.nguyen@...el.com, przemyslaw.kitszel@...el.com,
intel-wired-lan@...ts.osuosl.org, edumazet@...gle.com
Subject: Re: [PATCH v7 net-next 14/15] iavf: Add net_shaper_ops support
On Tue, 10 Sep 2024 00:10:08 +0200 Paolo Abeni wrote:
> + if (adapter->netdev->reg_state == NETREG_REGISTERED) {
> + mutex_lock(&adapter->netdev->lock);
> + devlock = true;
> + }
This leads to a false positive in cocci.
Any concerns about moving the mutex_init() / _destroy() into
alloc_netdev_mqs() / free_netdev()? I guess one could argue
that narrower scope of the lock being valid may help catching
errors, but I think we'll instead end up with more checks like
the above sprinkled around than bugs caught?
Powered by blists - more mailing lists