Received: by 10.223.185.116 with SMTP id b49csp1624385wrg; Sat, 24 Feb 2018 00:27:50 -0800 (PST) X-Google-Smtp-Source: AH8x226B4PSWDyRPI87tY4y736gf+fZ0cn+OgqVgLxJD/pBrNy9+FSVj+SSd4MdJuUIzDdlWk0Zk X-Received: by 10.98.76.215 with SMTP id e84mr4348929pfj.45.1519460870487; Sat, 24 Feb 2018 00:27:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519460870; cv=none; d=google.com; s=arc-20160816; b=xhabOgs5ENAStyjYIEg5UEdzIbLZps8wMFJYgj8tPR9VyU+FiYCX/iO7QZZ8Vb5qJY FRnFBXT0nI0TELe/oT6MutAbJrsAhWyTeNYxuTloebJ/JX35uQ6dRkqDZE+09D3VWG+o Fxrvt8fEfhUs8jNLSzDtHR5HLi1f/5pcKuYXtTU/8bkGahNTO387XLsEiwPQDESjWXrt QaPot1q+KVpgNbHG5nEXTQNqEzTrD8PH43OUO7stIkQaOy2mTQJgrRjFuQr3XlPJq0dd yjNwoj6kZXhf427ODJEWdR+9O+rpK1eJxu2MzMSB1LXlSZItO6ah4OCbPK4TgexgcgYU Sb7A== 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:arc-authentication-results; bh=nsgADOswLAe/metvnMLAMahDI49BpleuuvdKl0/3APg=; b=a4VEmNCowtvPY8JEV/pHHmL1rCkEaSYAHwRTaIZKz5JKlBxD0jlP6N9kovdjX51JgD xgWFDXzfmNArwqChaKMCSUURws6NUQmbjiKPFbkhHnkzh6lthKJ085lpfFd0DO0MXkdk r/ORRkIb58km/ZUnhW2z1k4laKB3NDNLVFjp471vhrNZzbcTjMj/PRRZHxQ91JKoE6iQ db0VMJxYgaqGD0kdfLmQZ/8zDkpfWCH9FKmhLOo8xpVWtkmoAA8Sx4oUVNuK44bgCyiW FtFKLsdjvgscgTAduyEHiMMMHrxZ8E/s/nH1/fkr0pRjxmGqCefYdRQz24wxEwJ/RJQU jlpw== 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 j5-v6si3193226plt.469.2018.02.24.00.27.23; Sat, 24 Feb 2018 00:27:50 -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 S1751378AbeBXI01 (ORCPT + 99 others); Sat, 24 Feb 2018 03:26:27 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:43046 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750998AbeBXI00 (ORCPT ); Sat, 24 Feb 2018 03:26:26 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 4CDC411C8; Sat, 24 Feb 2018 08:26:25 +0000 (UTC) Date: Sat, 24 Feb 2018 09:26:25 +0100 From: Greg Kroah-Hartman To: Nathan Chancellor 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: <20180224082625.GA9681@kroah.com> References: <20180223170325.997716448@linuxfoundation.org> <20180223170328.219713270@linuxfoundation.org> <20180223204608.GA6714@flashbox> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180223204608.GA6714@flashbox> 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 01:46:08PM -0700, Nathan Chancellor wrote: > 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. Ah, good catch, now fixed by dropping this patch from 4.4.y and 3.18.y, thanks. greg k-h