Received: by 10.223.185.116 with SMTP id b49csp760770wrg; Wed, 14 Feb 2018 06:38:44 -0800 (PST) X-Google-Smtp-Source: AH8x2265rYVKl7IiDygWYPjtZzsVQKIB1m3bt7GvYphcVwpgeD5CHhLyXSxg38i9GlsXxMV9PAN1 X-Received: by 10.101.81.4 with SMTP id f4mr2405760pgq.30.1518619123902; Wed, 14 Feb 2018 06:38:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518619123; cv=none; d=google.com; s=arc-20160816; b=WRkAOWzUCpYu9Kp/xwkP/D/tBY7Pl4XtWHrkh0uyRC89wJEyQUE1I+4J5GCN82YMMc EHCEWldF8EQZwJcF3RPGiY5/A58gtFU8qus51Y+FBDsbQvMS01CyZpZVcdPr8wwPmXJq yXJG1ZFQDGvEFVzexB9Pnk/hwJiQhAOov0eP5cFIPxs5IV/A/PzD+aW9xxwvB5eJb169 CIwIU71JwAz6vNmd4GEFMg+Lva7Z4NuJVUb++U/DQURv3BU6hyfzAG99c9VWIHjftckh Gznb/gl3oBenZSkoIHJtVOcFN2i3zWXipHDHogc3V3R2do1ZO2AEVKwEs8xipGHhEEQQ DmaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=PGYVmksq5b3UdzLGaVfQK6TV9oLiS2wXfo9vbIibm2g=; b=D94CRuK5sEHiEeaZUQhZzXdsXlDh466v16HakWY5GmmZ2uhI5oVJfRJYzb+HsDU9ba k5DwjVuei7c83frBGLMHwYtuGDHRQzEIDxYaJ/0pEHerYfYRCf++ydEwH7nSjvlg/hvA qZ6vQSaVDHK4XQKtzQWtDHgb25/JM+ogt4delF8V11U2HPavhxqzROpsp3DqY8cvkjss UJFbPGV2Xs16a3nI8Yv+pdYim9IjwESpvWZatmGrZsfqdArVI+cxsyAQJ+TkN1QuN27d 36e2ynUKUua/BNVkADoq0xb77Vn+di2l5Z0NvxYtrhqo2gq/8w6hq6JMlv27ejG3vTds Q/qg== 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 x1si8195312pgv.124.2018.02.14.06.38.28; Wed, 14 Feb 2018 06:38:43 -0800 (PST) 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 S1030836AbeBNOhg (ORCPT + 99 others); Wed, 14 Feb 2018 09:37:36 -0500 Received: from www62.your-server.de ([213.133.104.62]:48912 "EHLO www62.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030381AbeBNOhe (ORCPT ); Wed, 14 Feb 2018 09:37:34 -0500 Received: from [62.202.221.8] (helo=linux.home) by www62.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-SHA:256) (Exim 4.85_2) (envelope-from ) id 1elyBc-0003qw-T9; Wed, 14 Feb 2018 15:37:29 +0100 Subject: Re: [PATCH net] bpf: cpumap: use GFP_KERNEL instead of GFP_ATOMIC in __cpu_map_entry_alloc() To: Jason Wang , ast@kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Cc: mst@redhat.com, Michal Hocko , Matthew Wilcox , Jesper Dangaard Brouer , akpm@linux-foundation.org, dhowells@redhat.com, hannes@cmpxchg.org References: <1518617854-4486-1-git-send-email-jasowang@redhat.com> From: Daniel Borkmann Message-ID: <7d679561-1b07-a6ef-58d3-6fa7215d177d@iogearbox.net> Date: Wed, 14 Feb 2018 15:37:28 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <1518617854-4486-1-git-send-email-jasowang@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Authenticated-Sender: daniel@iogearbox.net X-Virus-Scanned: Clear (ClamAV 0.99.3/24314/Wed Feb 14 10:21:29 2018) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/14/2018 03:17 PM, Jason Wang wrote: > 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 Applied to bpf tree, thanks Jason!