* [PATCH net] gianfar: Do not reuse pages from emergency reserve
@ 2017-01-19 3:44 Eric Dumazet
2017-01-19 14:04 ` Claudiu Manoil
2017-01-19 16:50 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Eric Dumazet @ 2017-01-19 3:44 UTC (permalink / raw)
To: David Miller; +Cc: netdev, Claudiu Manoil
From: Eric Dumazet <edumazet@google.com>
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: 75354148ce69 ("gianfar: Add paged allocation and Rx S/G")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Claudiu Manoil <claudiu.manoil@freescale.com>
---
drivers/net/ethernet/freescale/gianfar.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/freescale/gianfar.c b/drivers/net/ethernet/freescale/gianfar.c
index a6e7afa878befd1abe00404b2cd4becfa174d103..c1b6716679208a69bc66f017a68e5b6e35c60064 100644
--- a/drivers/net/ethernet/freescale/gianfar.c
+++ b/drivers/net/ethernet/freescale/gianfar.c
@@ -2948,7 +2948,7 @@ static bool gfar_add_rx_frag(struct gfar_rx_buff *rxb, u32 lstatus,
}
/* try reuse page */
- if (unlikely(page_count(page) != 1))
+ if (unlikely(page_count(page) != 1 || page_is_pfmemalloc(page)))
return false;
/* change offset to the other half */
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [PATCH net] gianfar: Do not reuse pages from emergency reserve
2017-01-19 3:44 [PATCH net] gianfar: Do not reuse pages from emergency reserve Eric Dumazet
@ 2017-01-19 14:04 ` Claudiu Manoil
2017-01-19 16:50 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Claudiu Manoil @ 2017-01-19 14:04 UTC (permalink / raw)
To: Eric Dumazet, David Miller; +Cc: netdev
>-----Original Message-----
>From: Eric Dumazet [mailto:eric.dumazet@gmail.com]
>Sent: Thursday, January 19, 2017 5:45 AM
>To: David Miller <davem@davemloft.net>
>Cc: netdev <netdev@vger.kernel.org>; Claudiu Manoil
><claudiu.manoil@freescale.com>
>Subject: [PATCH net] gianfar: Do not reuse pages from emergency reserve
>
>From: Eric Dumazet <edumazet@google.com>
>
>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: 75354148ce69 ("gianfar: Add paged allocation and Rx S/G")
>Signed-off-by: Eric Dumazet <edumazet@google.com>
>Cc: Claudiu Manoil <claudiu.manoil@freescale.com>
Thanks.
Acked-by: Claudiu Manoil <claudiu.manoil@nxp.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net] gianfar: Do not reuse pages from emergency reserve
2017-01-19 3:44 [PATCH net] gianfar: Do not reuse pages from emergency reserve Eric Dumazet
2017-01-19 14:04 ` Claudiu Manoil
@ 2017-01-19 16:50 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2017-01-19 16:50 UTC (permalink / raw)
To: eric.dumazet; +Cc: netdev, claudiu.manoil
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Wed, 18 Jan 2017 19:44:42 -0800
> From: Eric Dumazet <edumazet@google.com>
>
> 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: 75354148ce69 ("gianfar: Add paged allocation and Rx S/G")
> Signed-off-by: Eric Dumazet <edumazet@google.com>
Applied.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-01-19 16:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-19 3:44 [PATCH net] gianfar: Do not reuse pages from emergency reserve Eric Dumazet
2017-01-19 14:04 ` Claudiu Manoil
2017-01-19 16:50 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.