]> git.baikalelectronics.ru Git - kernel.git/commit
net: Do not allocate page fragments that are not skb aligned
authorAlexander Duyck <alexander.h.duyck@linux.intel.com>
Fri, 15 Feb 2019 22:44:18 +0000 (14:44 -0800)
committerDavid S. Miller <davem@davemloft.net>
Sun, 17 Feb 2019 23:48:43 +0000 (15:48 -0800)
commit15da17e94e0e3c1d8788a0650ba454b5a70120c1
tree1ff1c631dd480f88ed716d02d858bba7530726d6
parent56f0688d4d9f0269bad56952468a4c87d18654e7
net: Do not allocate page fragments that are not skb aligned

This patch addresses the fact that there are drivers, specifically tun,
that will call into the network page fragment allocators with buffer sizes
that are not cache aligned. Doing this could result in data alignment
and DMA performance issues as these fragment pools are also shared with the
skb allocator and any other devices that will use napi_alloc_frags or
netdev_alloc_frags.

Fixes: 4d76151be427 ("net: Split netdev_alloc_frag into __alloc_page_frag and add __napi_alloc_frag")
Reported-by: Jann Horn <jannh@google.com>
Signed-off-by: Alexander Duyck <alexander.h.duyck@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/skbuff.c