]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit3b177d2b90957029826d9ab440ed1c9f6d7fdd4d
tree54911e9924e79c8eec9757d9ec0c4643ddb3568a
parent356b3b260947767463c0868f0b380a17954e951e
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: c4569c809d75 ("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