Skip to contentSkip to conversation

Patch "gianfar: Do not reuse pages from emergency reserve" has been added to the 4.4-stable tree

PATCH [email protected] 1 participant 1 message Jul 3, 2017

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

gianfar: Do not reuse pages from emergency reserve

to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
gianfar-do-not-reuse-pages-from-emergency-reserve.patch
and it can be found in the queue-4.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From foo@baz Mon Jul 3 11:54:22 CEST 2017

From: Eric Dumazet <[email protected]>
Date: Wed, 18 Jan 2017 19:44:42 -0800
Subject: gianfar: Do not reuse pages from emergency reserve

From: Eric Dumazet <[email protected]>

[ Upstream commit 69fed99baac186013840ced3524562841296034f ]

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")
Cc Claudiu Manoil <[email protected]>
---
 drivers/net/ethernet/freescale/gianfar.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/freescale/gianfar.c +1 -1
@@ -2939,7 +2939,7 @@ static bool gfar_add_rx_frag(struct gfar
 				size, GFAR_RXB_TRUESIZE);
 
 	/* 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 */

Patches currently in stable-queue which might be from [email protected] are

queue-4.4/gianfar-do-not-reuse-pages-from-emergency-reserve.patch queue-4.4/fix-an-intermittent-pr_emerg-warning-about-lo-becoming-free.patch queue-4.4/netfilter-xt_tcpmss-add-more-sanity-tests-on-tcph-doff.patch queue-4.4/ipv6-release-dst-on-error-in-ip6_dst_lookup_tail.patch queue-4.4/igmp-acquire-pmc-lock-for-ip_mc_clear_src.patch