lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <18971a87-4b52-4ce6-a36c-2d92738d7bfa@redhat.com>
Date: Thu, 19 Sep 2024 17:07:44 +0200
From: Paolo Abeni <pabeni@...hat.com>
To: Jakub Kicinski <kuba@...nel.org>
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 9/11/24 00:03, Jakub Kicinski wrote:
> 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?

I considered moving the locking initialization and shutdown, but I kept 
there for symmetry with the rss_lock. I'll move the init/destroy in the 
next revision.

Thanks,

Paolo


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ