All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net/nfp: initialize stats struct
@ 2017-11-08 11:59 Alejandro Lucero
  2017-11-10  1:10 ` Ferruh Yigit
  2017-11-10  9:37 ` Ferruh Yigit
  0 siblings, 2 replies; 5+ messages in thread
From: Alejandro Lucero @ 2017-11-08 11:59 UTC (permalink / raw)
  To: dev; +Cc: stable

Not all struct fields will be written and random data could
confuse readers.

Fixes: 92aa491b881e ("nfp: add statistics")
Coverity: 140755

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
---
 drivers/net/nfp/nfp_net.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
index 83dec06..0501156 100644
--- a/drivers/net/nfp/nfp_net.c
+++ b/drivers/net/nfp/nfp_net.c
@@ -1038,6 +1038,8 @@ enum nfp_qcp_ptr {
 
 	/* RTE_ETHDEV_QUEUE_STAT_CNTRS default value is 16 */
 
+	memset(&nfp_dev_stats, 0, sizeof(nfp_dev_stats));
+
 	/* reading per RX ring stats */
 	for (i = 0; i < dev->data->nb_rx_queues; i++) {
 		if (i == RTE_ETHDEV_QUEUE_STAT_CNTRS)
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] net/nfp: initialize stats struct
  2017-11-08 11:59 [PATCH] net/nfp: initialize stats struct Alejandro Lucero
@ 2017-11-10  1:10 ` Ferruh Yigit
  2017-11-10  4:05   ` Stephen Hemminger
  2017-11-10  9:37 ` Ferruh Yigit
  1 sibling, 1 reply; 5+ messages in thread
From: Ferruh Yigit @ 2017-11-10  1:10 UTC (permalink / raw)
  To: Alejandro Lucero, dev; +Cc: stable

On 11/8/2017 3:59 AM, Alejandro Lucero wrote:
> Not all struct fields will be written and random data could
> confuse readers.
> 
> Fixes: 92aa491b881e ("nfp: add statistics")
> Coverity: 140755

Hi Alejandro,

Thank you for coverity fixes, but they will be considered for next release,
since trying to limit rc4 only for critical fixes.

Thanks,
ferruh

> 
> Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] net/nfp: initialize stats struct
  2017-11-10  1:10 ` Ferruh Yigit
@ 2017-11-10  4:05   ` Stephen Hemminger
  2017-11-10  8:55     ` Ferruh Yigit
  0 siblings, 1 reply; 5+ messages in thread
From: Stephen Hemminger @ 2017-11-10  4:05 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Alejandro Lucero, dev, stable

On Thu, 9 Nov 2017 17:10:16 -0800
Ferruh Yigit <ferruh.yigit@intel.com> wrote:

> On 11/8/2017 3:59 AM, Alejandro Lucero wrote:
> > Not all struct fields will be written and random data could
> > confuse readers.
> > 
> > Fixes: 92aa491b881e ("nfp: add statistics")
> > Coverity: 140755  
> 
> Hi Alejandro,
> 
> Thank you for coverity fixes, but they will be considered for next release,
> since trying to limit rc4 only for critical fixes.
> 
> Thanks,
> ferruh
> 
> > 
> > Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>  
> 

This looks like a bug fix. because the stats are on the stack and will
be garbage.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] net/nfp: initialize stats struct
  2017-11-10  4:05   ` Stephen Hemminger
@ 2017-11-10  8:55     ` Ferruh Yigit
  0 siblings, 0 replies; 5+ messages in thread
From: Ferruh Yigit @ 2017-11-10  8:55 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Alejandro Lucero, dev, stable

On 11/9/2017 8:05 PM, Stephen Hemminger wrote:
> On Thu, 9 Nov 2017 17:10:16 -0800
> Ferruh Yigit <ferruh.yigit@intel.com> wrote:
> 
>> On 11/8/2017 3:59 AM, Alejandro Lucero wrote:
>>> Not all struct fields will be written and random data could
>>> confuse readers.
>>>
>>> Fixes: 92aa491b881e ("nfp: add statistics")
>>> Coverity: 140755  
>>
>> Hi Alejandro,
>>
>> Thank you for coverity fixes, but they will be considered for next release,
>> since trying to limit rc4 only for critical fixes.
>>
>> Thanks,
>> ferruh
>>
>>>
>>> Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>  
>>
> 
> This looks like a bug fix. because the stats are on the stack and will
> be garbage.

Yes it is, also other nfp patches are fixes.

This is for an effort to close the release, eventually it needs to stop
somewhere, and technically after rc3 is only for critical bug fixes, so this is
the time for stop getting these kind of patches.

After above said, relying on scope of the patches are PMD only and patches are
sent by driver maintainers, I will get them, reminding Thomas' right to drop
them back if he disagrees.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] net/nfp: initialize stats struct
  2017-11-08 11:59 [PATCH] net/nfp: initialize stats struct Alejandro Lucero
  2017-11-10  1:10 ` Ferruh Yigit
@ 2017-11-10  9:37 ` Ferruh Yigit
  1 sibling, 0 replies; 5+ messages in thread
From: Ferruh Yigit @ 2017-11-10  9:37 UTC (permalink / raw)
  To: Alejandro Lucero, dev; +Cc: stable

On 11/8/2017 3:59 AM, Alejandro Lucero wrote:
> Not all struct fields will be written and random data could
> confuse readers.
> 
> Fixes: 92aa491b881e ("nfp: add statistics")
> Coverity: 140755
> 
> Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>

Applied to dpdk/master, thanks.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-11-10  9:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-08 11:59 [PATCH] net/nfp: initialize stats struct Alejandro Lucero
2017-11-10  1:10 ` Ferruh Yigit
2017-11-10  4:05   ` Stephen Hemminger
2017-11-10  8:55     ` Ferruh Yigit
2017-11-10  9:37 ` Ferruh Yigit

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.