Commit a556f06
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: e3219ce ("i40e: Add support for client interface for IWARP driver")
Signed-off-by: Zhen Ni <[email protected]>
Reviewed-by: Paul Menzel <[email protected]>
Signed-off-by: Tony Nguyen <[email protected]>1 parent 9fcdb1c commit a556f06
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
359 | 359 | | |
360 | 360 | | |
361 | 361 | | |
362 | | - | |
363 | | - | |
| 362 | + | |
| 363 | + | |
364 | 364 | | |
365 | 365 | | |
366 | 366 | | |
| |||
0 commit comments