diff options
| author | Dan Carpenter <[email protected]> | 2023-10-19 17:32:27 +0000 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2023-10-20 11:53:06 +0000 |
| commit | a41654c3ed1d7d6a2f7ae485f3e3c655b428f38f (patch) | |
| tree | a787c5a354d729d3c81d1578c94cf855cc214dba /net/unix/unix_bpf.c | |
| parent | igb: Fix an end of loop test (diff) | |
| download | kernel-a41654c3ed1d7d6a2f7ae485f3e3c655b428f38f.tar.gz kernel-a41654c3ed1d7d6a2f7ae485f3e3c655b428f38f.zip | |
ixgbe: fix end of loop test in ixgbe_set_vf_macvlan()
The list iterator in a list_for_each_entry() loop can never be NULL.
If the loop exits without hitting a break then the iterator points
to an offset off the list head and dereferencing it is an out of
bounds access.
Before we transitioned to using list_for_each_entry() loops, then
it was possible for "entry" to be NULL and the comments mention
this. I have updated the comments to match the new code.
Fixes: c1fec890458a ("ethernet/intel: Use list_for_each_entry() helper")
Signed-off-by: Dan Carpenter <[email protected]>
Reviewed-by: Simon Horman <[email protected]>
Reviewed-by: Jesse Brandeburg <[email protected]>
Tested-by: Rafal Romanowski <[email protected]>
Signed-off-by: Jacob Keller <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'net/unix/unix_bpf.c')
0 files changed, 0 insertions, 0 deletions
