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] [day] [month] [year] [list]
Message-ID: <0a5fee34-5798-49f5-af3f-c6e56987da62@gmail.com>
Date: Wed, 9 Apr 2025 17:18:46 -0700
From: Mohsin Bashir <mohsin.bashr@...il.com>
To: Paolo Abeni <pabeni@...hat.com>, netdev@...r.kernel.org
Cc: alexanderduyck@...com, kuba@...nel.org, andrew+netdev@...n.ch,
 davem@...emloft.net, edumazet@...gle.com, suhui@...china.com,
 sanman.p211993@...il.com, vadim.fedorenko@...ux.dev, horms@...nel.org,
 kalesh-anakkur.purayil@...adcom.com, kernel-team@...a.com
Subject: Re: [PATCH net-next 2/5] eth: fbnic: add coverage for hw queue stats

>>   
>> +	for (i = 0; i < fbd->max_num_queues; i++) {
>> +		/* Report packets dropped due to CQ/BDQ being full/empty */
>> +		rx_over += fbd->hw_stats.hw_q[i].rde_pkt_cq_drop.value;
>> +		rx_over += fbd->hw_stats.hw_q[i].rde_pkt_bdq_drop.value;
> 
> I'm possibly missing something, but AFAICS the above statements can be
> executed without any lock held. Another thread can concurrently call
> fbnic_get_hw_stats() leading to an inconsistent snapshot.
> 
> Should fbnic_get_hw_stats() store the values in a local(ly allocated)
> struct?
> 

Thanks for pointing it out. You are right. Let me fix and resubmit.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ