From: Nicholas Nunley nicholas.d.nunley@intel.com
mainline inclusion from mainline-v5.16-rc2 commit 89f22f129696ab53cfbc608e0a2184d0fea46ac category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/I9FNG0 CVE: CVE-2021-47201
Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=...
--------------------------------
iavf_free_queues() clears adapter->num_active_queues, which iavf_free_q_vectors() relies on, so swap the order of these two function calls in iavf_disable_vf(). This resolves a panic encountered when the interface is disabled and then later brought up again after PF communication is restored.
Fixes: 65c7006f234c ("i40evf: assign num_active_queues inside i40evf_alloc_queues") Signed-off-by: Nicholas Nunley nicholas.d.nunley@intel.com Tested-by: Tony Brelinski tony.brelinski@intel.com Signed-off-by: Tony Nguyen anthony.l.nguyen@intel.com
Conflicts: drivers/net/ethernet/intel/i40evf/i40evf_main.c
Signed-off-by: Luo Gengkun luogengkun2@huawei.com --- drivers/net/ethernet/intel/i40evf/i40evf_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c b/drivers/net/ethernet/intel/i40evf/i40evf_main.c index f50c19b83368..29d5f851f55e 100644 --- a/drivers/net/ethernet/intel/i40evf/i40evf_main.c +++ b/drivers/net/ethernet/intel/i40evf/i40evf_main.c @@ -1797,8 +1797,8 @@ static void i40evf_disable_vf(struct i40evf_adapter *adapter)
i40evf_free_misc_irq(adapter); i40evf_reset_interrupt_capability(adapter); - i40evf_free_queues(adapter); i40evf_free_q_vectors(adapter); + i40evf_free_queues(adapter); kfree(adapter->vf_res); i40evf_shutdown_adminq(&adapter->hw); adapter->netdev->flags &= ~IFF_UP;
反馈: 您发送到kernel@openeuler.org的补丁/补丁集,已成功转换为PR! PR链接地址: https://gitee.com/openeuler/kernel/pulls/6138 邮件列表地址:https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/M...
FeedBack: The patch(es) which you have sent to kernel@openeuler.org mailing list has been converted to a pull request successfully! Pull request link: https://gitee.com/openeuler/kernel/pulls/6138 Mailing list address: https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/M...