net/mlx5e: Do not recycle pages from emergency reserve
authorEric Dumazet <edumazet@google.com>
Thu, 19 Jan 2017 07:03:08 +0000 (23:03 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 20 Jan 2017 17:41:46 +0000 (12:41 -0500)
commite048fc50d7bde23136e098e04a324d7e3404408d
tree942be3963c8a58d2fa891a7d043d34b69e07ea89
parentcdb749cef16bceb74950fc8668f2632ff7cac9aa
net/mlx5e: Do not recycle pages from emergency reserve

A driver using dev_alloc_page() must not reuse a page allocated from
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 received
packets would be dropped.

Fixes: 4415a0319f92 ("net/mlx5e: Implement RX mapped page cache for page recycle")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Tariq Toukan <tariqt@mellanox.com>
Cc: Saeed Mahameed <saeedm@mellanox.com>
Acked-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx5/core/en_rx.c