iavf: Fix double free in iavf_reset_task
authorPrzemyslaw Patynowski <przemyslawx.patynowski@intel.com>
Wed, 9 Mar 2022 15:37:39 +0000 (16:37 +0100)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Tue, 15 Mar 2022 20:36:13 +0000 (13:36 -0700)
commit16b2dd8cdf6f4e0597c34899de74b4d012b78188
tree54911e9924e79c8eec9757d9ec0c4643ddb3568a
parent1b4ae7d925c6569fff27313b4d84171b11510893
iavf: Fix double free in iavf_reset_task

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@intel.com>
Suggested-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mateusz Palczewski <mateusz.palczewski@intel.com>
Tested-by: Konrad Jankowski <konrad0.jankowski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/iavf/iavf_main.c