Loading
i40e: Fix call trace in setup_tx_descriptors
stable inclusion from stable-v4.19.24 commit 15950157e2c24865b696db1c9ccc72743ae0e967 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IBP4HT CVE: CVE-2022-49725 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=15950157e2c24865b696db1c9ccc72743ae0e967 ---------------------------------------------------------------------- [ Upstream commit fd5855e6 ] After PF reset and ethtool -t there was call trace in dmesg sometimes leading to panic. When there was some time, around 5 seconds, between reset and test there were no errors. Problem was that pf reset calls i40e_vsi_close in prep_for_reset and ethtool -t calls i40e_vsi_close in diag_test. If there was not enough time between those commands the second i40e_vsi_close starts before previous i40e_vsi_close was done which leads to crash. Add check to diag_test if pf is in reset and don't start offline tests if it is true. Add netif_info("testing failed") into unhappy path of i40e_diag_test() Fixes: e17bc411 ("i40e: Disable offline diagnostics if VFs are enabled") Fixes: 510efb26 ("i40e: Fix ethtool offline diagnostic with netqueues") Signed-off-by:Michal Jaron <michalx.jaron@intel.com> Signed-off-by:
Aleksandr Loktionov <aleksandr.loktionov@intel.com> Tested-by: Gurucharan <gurucharanx.g@intel.com> (A Contingent worker at Intel) Signed-off-by:
Tony Nguyen <anthony.l.nguyen@intel.com> Signed-off-by:
Sasha Levin <sashal@kernel.org> Signed-off-by:
Chen Ridong <chenridong@huawei.com> Reviewed-by:
Xiu Jianfeng <xiujianfeng@huawei.com>