Skip to content
Commit 9b5c4dfb authored by Vadim Lomovtsev's avatar Vadim Lomovtsev Committed by David S. Miller
Browse files

net: thunderx: rework mac addresses list to u64 array

It is too expensive to pass u64 values via linked list, instead
allocate array for them by overall number of mac addresses from netdev.

This eventually removes multiple kmalloc() calls, aviod memory
fragmentation and allow to put single null check on kmalloc
return value in order to prevent a potential null pointer dereference.

Addresses-Coverity-ID: 1467429 ("Dereference null return value")
Fixes: 37c3347e

 ("net: thunderx: add ndo_set_rx_mode callback implementation for VF")
Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarVadim Lomovtsev <Vadim.Lomovtsev@cavium.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b6a37e5e
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment