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

Huang, Peng peng.huang at intel.com
Wed May 11 10:50:53 CEST 2022


> -----Original Message-----
> From: Yiding Zhou <yidingx.zhou at intel.com>
> Sent: Wednesday, April 27, 2022 11:25 PM
> To: dev at dpdk.org; Wu, Jingjing <jingjing.wu at intel.com>; Xing, Beilei
> <beilei.xing at intel.com>
> Cc: Yang, Qiming <qiming.yang at intel.com>; Zhang, Qi Z
> <qi.z.zhang at intel.com>; stable at dpdk.org; Zhou, YidingX
> <yidingx.zhou at intel.com>
> Subject: [PATCH v2] 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>
Tested-by: Peng Huang <peng.huang at intel.com>


More information about the stable mailing list