Commit a556f063 authored by Zhen Ni's avatar Zhen Ni Committed by Tony Nguyen
Browse files

i40e: Fix potential invalid access when MAC list is empty



list_first_entry() never returns NULL - if the list is empty, it still
returns a pointer to an invalid object, leading to potential invalid
memory access when dereferenced.

Fix this by using list_first_entry_or_null instead of list_first_entry.

Fixes: e3219ce6 ("i40e: Add support for client interface for IWARP driver")
Signed-off-by: default avatarZhen Ni <zhen.ni@easystack.cn>
Reviewed-by: default avatarPaul Menzel <pmenzel@molgen.mpg.de>
Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
parent 9fcdb1c3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment