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: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NVadim Lomovtsev <Vadim.Lomovtsev@cavium.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
Showing
想要评论请 注册 或 登录