diff options
| author | Dan Carpenter <[email protected]> | 2023-10-19 17:32:26 +0000 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2023-10-20 11:53:06 +0000 |
| commit | 4690aea589e76e887a40195b35b6d19a838058eb (patch) | |
| tree | 50c97863fbc73fadaaea6957d39bf921fef5e0f0 /net/unix/unix_bpf.c | |
| parent | ice: cleanup ice_find_netlist_node (diff) | |
| download | kernel-4690aea589e76e887a40195b35b6d19a838058eb.tar.gz kernel-4690aea589e76e887a40195b35b6d19a838058eb.zip | |
igb: Fix an end of loop test
When we exit a list_for_each_entry() without hitting a break statement,
the list iterator isn't NULL, it just point to an offset off the
list_head. In that situation, it wouldn't be too surprising for
entry->free to be true and we end up corrupting memory.
The way to test for these is to just set a flag.
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
