[PATCH v5] net: thunderx: rework mac addresses list to u64 array

David Miller davem at davemloft.net
Mon Apr 9 08:00:16 PDT 2018


From: Vadim Lomovtsev <Vadim.Lomovtsev at caviumnetworks.com>
Date: Mon,  9 Apr 2018 06:24:48 -0700

> From: Vadim Lomovtsev <Vadim.Lomovtsev at cavium.com>
> 
> 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: 37c3347eb247 ("net: thunderx: add ndo_set_rx_mode callback implementation for VF")
> Reported-by: Dan Carpenter <dan.carpenter at oracle.com>
> Signed-off-by: Vadim Lomovtsev <Vadim.Lomovtsev at cavium.com>

Applied, thanks.



More information about the linux-arm-kernel mailing list