[Intel-wired-lan] [PATCH net-next v1] iavf: Fix double free in iavf_reset_task

Jankowski, Konrad0 konrad0.jankowski at intel.com
Tue Mar 15 13:32:52 UTC 2022



> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces at osuosl.org> On Behalf Of
> Mateusz Palczewski
> Sent: Wednesday, March 9, 2022 4:38 PM
> To: intel-wired-lan at lists.osuosl.org
> Cc: Palczewski, Mateusz <mateusz.palczewski at intel.com>; Patynowski,
> PrzemyslawX <przemyslawx.patynowski at intel.com>; Dan Carpenter
> <dan.carpenter at oracle.com>
> Subject: [Intel-wired-lan] [PATCH net-next v1] iavf: Fix double free in
> iavf_reset_task
> 
> From: Przemyslaw Patynowski <przemyslawx.patynowski at intel.com>
> 
> Fix double free possibility in iavf_disable_vf, as crit_lock is freed in caller,
> iavf_reset_task. Add kernel-doc for iavf_disable_vf.
> Remove mutex_unlock in iavf_disable_vf.
> Without this patch there is double free scenario, when calling
> iavf_reset_task.
> 
> Fixes: e85ff9c631e1 ("iavf: Fix deadlock in iavf_reset_task")
> Signed-off-by: Przemyslaw Patynowski
> <przemyslawx.patynowski at intel.com>
> Suggested-by: Dan Carpenter <dan.carpenter at oracle.com>
> Signed-off-by: Mateusz Palczewski <mateusz.palczewski at intel.com>
> ---
>  Note: This is targeted to net-next because it fixes a patch  that is not present
> in net.
> ---
>  drivers/net/ethernet/intel/iavf/iavf_main.c | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/intel/iavf/iavf_main.c
> b/drivers/net/ethernet/intel/iavf/iavf_main.c
> index 7c4b75a..c11e2ab 100644
> --- a/drivers/net/ethernet/intel/iavf/iavf_main.c
> +++ b/drivers/net/ethernet/intel/iavf/iavf_main.c
> @@ -2705,6 +2705,13 @@ static void iavf_watchdog_task(struct work_struct

Tested-by: Konrad Jankowski <konrad0.jankowski at intel.com>


More information about the Intel-wired-lan mailing list