Skip to content

Commit 38318f2

Browse files
wyjwanganguy11
authored andcommitted
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: 7b0b1a6 ("i40e: Disable iWARP VSI PETCP_ENA flag on netdev down events") Signed-off-by: Yunjian Wang <[email protected]> Signed-off-by: Tony Nguyen <[email protected]>
1 parent ae4393d commit 38318f2

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/net/ethernet/intel/i40e/i40e_client.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,7 @@ void i40e_client_subtask(struct i40e_pf *pf)
375375
clear_bit(__I40E_CLIENT_INSTANCE_OPENED,
376376
&cdev->state);
377377
i40e_client_del_instance(pf);
378+
return;
378379
}
379380
}
380381
}

0 commit comments

Comments
 (0)