]> git.baikalelectronics.ru Git - kernel.git/commit
gianfar: Do not reuse pages from emergency reserve
authorEric Dumazet <edumazet@google.com>
Thu, 19 Jan 2017 03:44:42 +0000 (19:44 -0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 19 Jan 2017 16:49:15 +0000 (11:49 -0500)
commit12416a402a375148b6418455b2bdee6cb917bd11
tree71bd26d5340acd4eec2f91be973fc093675a1a0a
parent15e518b4c52324fa039a0a0874fab8fad6a0bc45
gianfar: Do not reuse pages from emergency reserve

A driver using dev_alloc_page() must not reuse a page that had to
use emergency memory reserve.

Otherwise all packets using this page will be immediately dropped,
unless for very specific sockets having SOCK_MEMALLOC bit set.

This issue might be hard to debug, because only a fraction of the RX
ring buffer would suffer from drops.

Fixes: b31f5200cd02 ("gianfar: Add paged allocation and Rx S/G")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Claudiu Manoil <claudiu.manoil@freescale.com>
Acked-by: Claudiu Manoil <claudiu.manoil@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/gianfar.c