> From: David Harton (dharton) [mailto:[email protected]]
> Sent: Thursday, January 11, 2018 2:59 PM
> To: Van Haaren, Harry <[email protected]>; Wu, Jingjing
> <[email protected]>; Xing, Beilei <[email protected]>
> Cc: [email protected]; Zhao1, Wei <[email protected]>
> Subject: RE: [dpdk-dev] [PATCH] net/i40e: fix VF reset stats crash
> 
> 
> > -----Original Message-----
> > From: Van Haaren, Harry [mailto:[email protected]]
> >
> > > From: dev [mailto:[email protected]] On Behalf Of David C Harton
> > >
> > > Calling i40evf_dev_xstats_reset can sometimes crash.
> > >
> > > Fixed issue by adding a pstats NULL check.
> >
> > Perhaps add a note here, that the root cause of (pstats == NULL) is a
> > valid error return from i40evf_query_stats(), if the vf command fails to
> > execute.
> >
> > Hence, we are not hiding symptoms of a different issue here, this NULL
> > check is required to validate the returned values.
> >
> 
> NULL is returned if the call fails.
> If desired I can capture the return code and base the check off the rc
> instead.
> That's the pattern used in a couple other places.

If you prefer that implementation of the check, you can keep my Ack, I don't 
mind much.

I reviewed as in my experience a NULL pointer can often be detected earlier, 
but that wasn't the case here.

PS: Apologies I didn't reply to v2, was reading "up" and didn't check for 
newer..

Reply via email to