Loading
i40e: fix vf may be used uninitialized in this function warning
stable inclusion from stable-v5.10.215 commit b8e82128b44fa40bf99a50b919488ef361e1683c category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/I9TM2V CVE: CVE-2024-36020 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=b8e82128b44fa40bf99a50b919488ef361e1683c -------------------------------- commit f37c4eac99c258111d414d31b740437e1925b8e8 upstream. To fix the regression introduced by commit 52424f97, which causes servers hang in very hard to reproduce conditions with resets races. Using two sources for the information is the root cause. In this function before the fix bumping v didn't mean bumping vf pointer. But the code used this variables interchangeably, so stale vf could point to different/not intended vf. Remove redundant "v" variable and iterate via single VF pointer across whole function instead to guarantee VF pointer validity. Fixes: 52424f97 ("i40e: Fix VF hang when reset is triggered on another VF") Signed-off-by:Aleksandr Loktionov <aleksandr.loktionov@intel.com> Reviewed-by:
Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com> Reviewed-by:
Przemek Kitszel <przemyslaw.kitszel@intel.com> Reviewed-by:
Paul Menzel <pmenzel@molgen.mpg.de> Tested-by:
Rafal Romanowski <rafal.romanowski@intel.com> Signed-off-by:
Tony Nguyen <anthony.l.nguyen@intel.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by:
Yongqiang Liu <liuyongqiang13@huawei.com>