[PATCH v3] net/iavf: fix segfaults when calling API after VF reset failed

Zhang, Qi Z qi.z.zhang at intel.com
Wed May 18 06:10:53 CEST 2022



> -----Original Message-----
> From: Zhou, YidingX <yidingx.zhou at intel.com>
> Sent: Thursday, May 12, 2022 6:49 PM
> To: dev at dpdk.org; Wu, Jingjing <jingjing.wu at intel.com>; Xing, Beilei
> <beilei.xing at intel.com>
> Cc: Zhang, Qi Z <qi.z.zhang at intel.com>; stable at dpdk.org
> Subject: [PATCH v3] net/iavf: fix segfaults when calling API after VF reset failed
> 
> Some pointers will be set to NULL when iavf_dev_reset() failed, for example vf-
> >vf_res, vf->vsi_res vf->rss_key and etc.
> APIs access these NULL pointers will trigger segfault.
> 
> This patch adds closed flag to indicate that the VF is closed, and rejects API calls
> in this state to avoid coredump.
> 
> Fixes: e74e1bb6280d ("net/iavf: enable port reset")
> Cc: stable at dpdk.org
> 
> Signed-off-by: Yiding Zhou <yidingx.zhou at intel.com>

Acked-by: Qi Zhang <qi.z.zhang at intel.com>

Applied to dpdk-next-net-intel.

Thanks
Qi



More information about the dev mailing list