]> git.baikalelectronics.ru Git - kernel.git/commit
i40e: Fix use-after-free in i40e_client_subtask()
authorYunjian Wang <wangyunjian@huawei.com>
Mon, 12 Apr 2021 14:41:18 +0000 (22:41 +0800)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Fri, 7 May 2021 16:35:49 +0000 (09:35 -0700)
commit32fca7b969c4a46128e2c6571a41744e5f979fd4
tree6b42cf8cfff18559520bcaae40ffc12c7f920c29
parentf4ba73f723920f5a7ed31a322bdb51777b30f1f3
i40e: Fix use-after-free in i40e_client_subtask()

Currently the call to i40e_client_del_instance frees the object
pf->cinst, however pf->cinst->lan_info is being accessed after
the free. Fix this by adding the missing return.

Addresses-Coverity: ("Read from pointer after free")
Fixes: 2540464cc26a ("i40e: Disable iWARP VSI PETCP_ENA flag on netdev down events")
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/i40e/i40e_client.c