Re: [PATCH] net: don't use kvzalloc for DMA memory
From: Mikulas Patocka
Date: Wed Apr 18 2018 - 13:54:06 EST
On Wed, 18 Apr 2018, David Miller wrote:
> From: Mikulas Patocka <mpatocka@xxxxxxxxxx>
> Date: Wed, 18 Apr 2018 12:44:25 -0400 (EDT)
> > The structure net_device is followed by arbitrary driver-specific data
> > (accessible with the function netdev_priv). And for virtio-net, these
> > driver-specific data must be in DMA memory.
> And we are saying that this assumption is wrong and needs to be
So, try to find all the networking drivers that to DMA to the private
The problem here is that kvzalloc usually returns DMA-able area, but it
may return non-DMA area rarely, if the memory is too fragmented. So, we
are in a situation, where some networking drivers will randomly fail. Go
and find them.