Received: by 10.213.65.68 with SMTP id h4csp473003imn; Tue, 13 Mar 2018 10:08:14 -0700 (PDT) X-Google-Smtp-Source: AG47ELsEu2zExHLc362iqGZd5NbN2Ytm7ZzLxuirUXyRXZvV3YafoaDAJF89zRiwOoyhNKzq6Jgn X-Received: by 10.101.99.66 with SMTP id p2mr1038679pgv.384.1520960894431; Tue, 13 Mar 2018 10:08:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520960894; cv=none; d=google.com; s=arc-20160816; b=zzhBbP+E1X3qZWat473N+C8Grwnq63hoBavJjE3nD3EZWc5wul3V7T61qXLAJOVOx+ wm+z42y4fHHrO64KAdaUvD/aKzfnDBPB+1EpI7p0aBmPSj4KuuJOuHIGqE332Tlepqis 6to+MDTucOTjZiV0hNjkQxPy0lMv/tr9SouKTvv3ljEogOeG4NhfMOdGSfZ+DE/OrcvT aO+Fg9kwTxdhHqYbucnKqz/3ErV5n5dPd4T2WjijhDaoY/wJEWn1IWJkbsdhP18IuRm0 waFDpg2SoPhYfGKtogchob6Mpj/dSTg4wbH+v1/RMmNDIWF2A4Z0ySYcIIq+UAPFl30M 2U4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=TojmPEh5v2xCQkRUEtBNTbYN1Ekm4dT7fwUYW6rZqx0=; b=BhPNS+IKSzJM8+j3xmnMUJtLFg4hJDGBbIFUSbQH63Wo7f8EMPVUxnMHo0J6jQzOlE /GMrM9NpCJTiHnlj/IDX8F9Hn892wzvMarX1/Zf5vhDJE6ONZOQgeCeEw1QoWCdqy+D+ +sp/rkQhTyMO61nOkiiFyQAqceCjV3BbZhIy+HQvyjH3oQzTtteJzwZRZjiaywLBEFDv KVLn6GoHZVTxQ8jFqCUWNKWd7qJEUGvFyHchwl0aYdQ7TWTEfh+XE6RgmF3kjrCk/uMy h1F/Dd05xchJKf870INGdbG6WySAYbruqCS3CVPZQKt1SThSM3qZGbmuNAE6Xlbqh03Y Qd2A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p18si379802pgu.147.2018.03.13.10.07.59; Tue, 13 Mar 2018 10:08:14 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932605AbeCMP17 (ORCPT + 99 others); Tue, 13 Mar 2018 11:27:59 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:57368 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932542AbeCMP15 (ORCPT ); Tue, 13 Mar 2018 11:27:57 -0400 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 3CF2511D9; Tue, 13 Mar 2018 15:27:56 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, syzbot+1a240cdb1f4cc88819df@syzkaller.appspotmail.com, Michal Hocko , Daniel Borkmann , Matthew Wilcox , Jesper Dangaard Brouer , akpm@linux-foundation.org, dhowells@redhat.com, hannes@cmpxchg.org, Jason Wang Subject: [PATCH 4.15 004/146] bpf: cpumap: use GFP_KERNEL instead of GFP_ATOMIC in __cpu_map_entry_alloc() Date: Tue, 13 Mar 2018 16:22:51 +0100 Message-Id: <20180313152320.932915953@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180313152320.439085687@linuxfoundation.org> References: <20180313152320.439085687@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Jason Wang commit 7fc17e909edfb9bf421ee04e981d3d474175c7c7 upstream. There're several implications after commit 0bf7800f1799 ("ptr_ring: try vmalloc() when kmalloc() fails") with the using of vmalloc() since can't allow GFP_ATOMIC but mandate GFP_KERNEL. This will lead a WARN since cpumap try to call with GFP_ATOMIC. Fortunately, entry allocation of cpumap can only be done through syscall path which means GFP_ATOMIC is not necessary, so fixing this by replacing GFP_ATOMIC with GFP_KERNEL. Reported-by: syzbot+1a240cdb1f4cc88819df@syzkaller.appspotmail.com Fixes: 0bf7800f1799 ("ptr_ring: try vmalloc() when kmalloc() fails") Cc: Michal Hocko Cc: Daniel Borkmann Cc: Matthew Wilcox Cc: Jesper Dangaard Brouer Cc: akpm@linux-foundation.org Cc: dhowells@redhat.com Cc: hannes@cmpxchg.org Signed-off-by: Jason Wang Acked-by: Jesper Dangaard Brouer Signed-off-by: Daniel Borkmann Signed-off-by: Greg Kroah-Hartman --- kernel/bpf/cpumap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/kernel/bpf/cpumap.c +++ b/kernel/bpf/cpumap.c @@ -339,7 +339,7 @@ static int cpu_map_kthread_run(void *dat struct bpf_cpu_map_entry *__cpu_map_entry_alloc(u32 qsize, u32 cpu, int map_id) { - gfp_t gfp = GFP_ATOMIC|__GFP_NOWARN; + gfp_t gfp = GFP_KERNEL | __GFP_NOWARN; struct bpf_cpu_map_entry *rcpu; int numa, err;