From patchwork Wed May 3 08:44:19 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Lagerwall X-Patchwork-Id: 757889 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3wHsG35N3dz9s7j for ; Wed, 3 May 2017 18:46:35 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752274AbdECIqc (ORCPT ); Wed, 3 May 2017 04:46:32 -0400 Received: from smtp.citrix.com ([66.165.176.89]:41951 "EHLO SMTP.CITRIX.COM" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751533AbdECIq2 (ORCPT ); Wed, 3 May 2017 04:46:28 -0400 X-IronPort-AV: E=Sophos;i="5.38,283,1491264000"; d="scan'208";a="421989401" From: Ross Lagerwall To: CC: Ross Lagerwall , "David S. Miller" , Greg Kroah-Hartman , Eric Dumazet , , Subject: [PATCH RESEND 4.4-only] netlink: Allow direct reclaim for fallback allocation Date: Wed, 3 May 2017 09:44:19 +0100 Message-ID: <1493801059-2828-1-git-send-email-ross.lagerwall@citrix.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org The backport of d35c99ff77ec ("netlink: do not enter direct reclaim from netlink_dump()") to the 4.4 branch (first in 4.4.32) mistakenly removed direct claim from the initial large allocation _and_ the fallback allocation which means that allocations can spuriously fail. Fix the issue by adding back the direct reclaim flag to the fallback allocation. Fixes: 6d123f1d396b ("netlink: do not enter direct reclaim from netlink_dump()") Signed-off-by: Ross Lagerwall --- Note that this is only for the 4.4 branch as the regression is only in this branch. Consequently, there is no corresponding upstream commit. I'm resending this to the linux-stable list since I now understand the netdev maintainer only handles backports for the last couple of versions of Linux. net/netlink/af_netlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c index 8e33019..acfb16f 100644 --- a/net/netlink/af_netlink.c +++ b/net/netlink/af_netlink.c @@ -2107,7 +2107,7 @@ static int netlink_dump(struct sock *sk) if (!skb) { alloc_size = alloc_min_size; skb = netlink_alloc_skb(sk, alloc_size, nlk->portid, - (GFP_KERNEL & ~__GFP_DIRECT_RECLAIM)); + GFP_KERNEL); } if (!skb) goto errout_skb;