Received: by 10.223.185.116 with SMTP id b49csp1147199wrg; Fri, 23 Feb 2018 12:47:29 -0800 (PST) X-Google-Smtp-Source: AH8x225LcUBmY/7Rn7eGLT1wYlKQtf7e4cdF03FFMjZOatP9Zi9Yu26js15PDxafy84Snk9LsixN X-Received: by 2002:a17:902:70c9:: with SMTP id l9-v6mr2796994plt.67.1519418849509; Fri, 23 Feb 2018 12:47:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519418849; cv=none; d=google.com; s=arc-20160816; b=c1Wd6jM9h9UbXl/MAgDdf6U+qxLMcn/FBtltyMaXClC03CTqkQ07QpkcjaQWk2eVNu YOD3wPvARbLrNAUlZE1cQd6Z0ptX55mtNXYdwthiwu6tZCKtyoiQ2BEU2PMzSyNByMLG fYiuBpSsD/hrYp+skU5Xw3Htzk7JQV2yLTB+cnwOAtmfGt6XdzfaLUf12v3f8eV2I51H 0SLVUkE3FqZuXpdIWVSr/KULyzjvJr/vq5aB9w15ey2IhUkVQwdhPFVcqxD8KYfqM+0v U6jkh3iWodZlXdssAvj1C4tkzymCus4bCqx2V0raXfLB46Ki11tjbbqo3HYTcn2X/tEq MDPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=w6BD1VeOtsXMMhdGMVnV47YaRQwnfr19RvFLqleseg4=; b=F8F89hdFRJsaJaidNwsgGsXiXax/F/gN7xJXBCl0NWgM7VISwHBp0pUeJxwFYDmT5K +P4tx/CkEgWVXuSGG2v4hFEwPU8URJ6jKBUftzYXKiNYlZTtCgDs7UIEFt1Rd5qcLovQ saCAkrbh10RUpEgcbVG/ZHv4lUvudW1soAlNy0g1Ad5H7TGkcJn70mgX9wMpmw84jXFR 4w0sbmeRR/Qew1s4+7Aazc2/BARrxIGYbrvElRbgL8buw1EejJImh0JmT8xq6l6NLu3O W2ZeqWpJrdrcf21zj6Dt/SvKSR065tcoqnrgQ0MR6skrIpSadXEDy6PUmWds1GSHXQiY USsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=d+C1jbcS; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a4si1931386pgn.327.2018.02.23.12.47.15; Fri, 23 Feb 2018 12:47:29 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=d+C1jbcS; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753040AbeBWUqO (ORCPT + 99 others); Fri, 23 Feb 2018 15:46:14 -0500 Received: from mail-wm0-f67.google.com ([74.125.82.67]:54531 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752373AbeBWUqL (ORCPT ); Fri, 23 Feb 2018 15:46:11 -0500 Received: by mail-wm0-f67.google.com with SMTP id z81so6911417wmb.4; Fri, 23 Feb 2018 12:46:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=w6BD1VeOtsXMMhdGMVnV47YaRQwnfr19RvFLqleseg4=; b=d+C1jbcSdSWDpGmmhOToHvrvvBxCr9qtCgNqEPuIZe8WCkpGevWIv6CtP8yiZqKz1S fitTjb2FxBHYwlSl4L/RS3Em323vTM3Iowlvyy9NCEBL/pRxNEP36YgJ3qRYIsnQX9aY EgboKYkRTK6B1h41jtaJnNqTXYi8lSr81/uIDo0zZyG824R+Ytsfiy15Yp5foFZm8FQT os71MctFG+7bLHmk1i+tcL+vsYZhXygd2MYyJOm+TfEi0mST7WyKwZJVHJrTwrwLc3ab zM3wr6exmXGkR6m6b7XlPGhlv7kOGl6s1hiQaXYAcM8IpONbgrlQ5GpvznVFBNmqacg8 46fQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=w6BD1VeOtsXMMhdGMVnV47YaRQwnfr19RvFLqleseg4=; b=GGZ2rWbb04dwy9VaQvBNFwlRDUTaoXp3Dh44ClNQbVXw663jeIT3vdkGsZhlCq32cQ dTVicvuoWnL+H8nK/LAO2aOG4l5SXtCBNMtQIkIwXjRj9hpbBDkdiTf5NBNZpJtnKW8/ Qd4/MWmmaWajyPIEdNzizQL194wcyqUE6LnsBrWZVCsJlxP9Ss7fuVZc8hiIEbOISgoZ kO0COHjCtxVk6DoGfwPwPiyiSP4i4zwpor20Lx/NMVvCPdmNUdUr1h4pjzKTbsl/6fDW V27WylZe5RB+zxKtqzZCY6U1gzKhvimJaXVaxjwEF8pQ/RBJ7p+14AbpqD61Adl4YMya FlKg== X-Gm-Message-State: APf1xPAPlicMa8u2nufnTeSHSXjG2DtPkyrWJA8aidO/ktsq60x3WqLf H+kZ6dgwVgfTjLPqRwxPNP9r+vUQ X-Received: by 10.28.50.199 with SMTP id y190mr2679943wmy.161.1519418770329; Fri, 23 Feb 2018 12:46:10 -0800 (PST) Received: from flashbox ([2a01:4f8:10b:24a5::2]) by smtp.gmail.com with ESMTPSA id o9sm4318538wrf.43.2018.02.23.12.46.09 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 23 Feb 2018 12:46:09 -0800 (PST) Date: Fri, 23 Feb 2018 13:46:08 -0700 From: Nathan Chancellor To: Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, syzbot+76e7efc4748495855a4d@syzkaller.appspotmail.com, syzbot , Laura Abbott Subject: Re: [PATCH 4.4 013/193] staging: android: ion: Add __GFP_NOWARN for system contig heap Message-ID: <20180223204608.GA6714@flashbox> References: <20180223170325.997716448@linuxfoundation.org> <20180223170328.219713270@linuxfoundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180223170328.219713270@linuxfoundation.org> User-Agent: Mutt/1.9.3 (2018-01-21) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 23, 2018 at 07:24:06PM +0100, Greg Kroah-Hartman wrote: > 4.4-stable review patch. If anyone has any objections, please let me know. > > ------------------ > > From: Laura Abbott > > commit 0c75f10312a35b149b2cebb1832316b35c2337ca upstream. > > syzbot reported a warning from Ion: > > WARNING: CPU: 1 PID: 3485 at mm/page_alloc.c:3926 > > ... > __alloc_pages_nodemask+0x9fb/0xd80 mm/page_alloc.c:4252 > alloc_pages_current+0xb6/0x1e0 mm/mempolicy.c:2036 > alloc_pages include/linux/gfp.h:492 [inline] > ion_system_contig_heap_allocate+0x40/0x2c0 > drivers/staging/android/ion/ion_system_heap.c:374 > ion_buffer_create drivers/staging/android/ion/ion.c:93 [inline] > ion_alloc+0x2c1/0x9e0 drivers/staging/android/ion/ion.c:420 > ion_ioctl+0x26d/0x380 drivers/staging/android/ion/ion-ioctl.c:84 > vfs_ioctl fs/ioctl.c:46 [inline] > do_vfs_ioctl+0x1b1/0x1520 fs/ioctl.c:686 > SYSC_ioctl fs/ioctl.c:701 [inline] > SyS_ioctl+0x8f/0xc0 fs/ioctl.c:692 > > This is a warning about attempting to allocate order > MAX_ORDER. This > is coming from a userspace Ion allocation request. Since userspace is > free to request however much memory it wants (and the kernel is free to > deny its allocation), silence the allocation attempt with __GFP_NOWARN > in case it fails. > > Reported-by: syzbot+76e7efc4748495855a4d@syzkaller.appspotmail.com > Reported-by: syzbot > Signed-off-by: Laura Abbott > Signed-off-by: Greg Kroah-Hartman > > --- > drivers/staging/android/ion/ion_system_heap.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > --- a/drivers/staging/android/ion/ion_system_heap.c > +++ b/drivers/staging/android/ion/ion_system_heap.c > @@ -336,7 +336,7 @@ static int ion_system_contig_heap_alloca > if (align > (PAGE_SIZE << order)) > return -EINVAL; > > - page = alloc_pages(low_order_gfp_flags, order); > + page = alloc_pages(low_order_gfp_flags | __GFP_NOWARN, order); > if (!page) > return -ENOMEM; > > > This commit is not necessary as __GFP_NOWARN is still in the global low_order_gfp_flags since commit d2805d7fff5b ("staging: ion: remove __GFP_NOWARN when use low order gfp flags") did not show up until 4.9. This also applies to 3.18. Thanks! Nathan