From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755947AbdEESgx (ORCPT ); Fri, 5 May 2017 14:36:53 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:59068 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755045AbdEESeX (ORCPT ); Fri, 5 May 2017 14:34:23 -0400 From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Greg Kroah-Hartman , Ross Lagerwall Subject: [PATCH 4.4 12/20] netlink: Allow direct reclaim for fallback allocation Date: Fri, 5 May 2017 11:33:02 -0700 Message-Id: <20170505183231.428373749@linuxfoundation.org> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170505183230.937615081@linuxfoundation.org> References: <20170505183230.937615081@linuxfoundation.org> User-Agent: quilt/0.65 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Ross Lagerwall 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 Signed-off-by: Greg Kroah-Hartman --- 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(-) --- 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;