Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754035AbbB0DBd (ORCPT ); Thu, 26 Feb 2015 22:01:33 -0500 Received: from mail-ie0-f172.google.com ([209.85.223.172]:43752 "EHLO mail-ie0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752001AbbB0DBc (ORCPT ); Thu, 26 Feb 2015 22:01:32 -0500 Date: Thu, 26 Feb 2015 19:01:28 -0800 (PST) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: =?UTF-8?Q?Arve_Hj=C3=B8nnev=C3=A5g?= cc: Amit Pundir , LKML , a.ryabinin@samsung.com, dvyukov@google.com, kcc@google.com, dmitryc@google.com, adech.fo@gmail.com, tetra2005@gmail.com, koct9i@gmail.com, sasha.levin@oracle.com, cl@linux.com, iamjoonsoo.kim@lge.com, dave.hansen@intel.com, andi@firstfloor.org, Ingo Molnar , Thomas Gleixner , "H. Peter Anvin" , penberg@kernel.org, Greg KH , Riley Andrews , Serban Constantinescu , John Stultz , Sumit Semwal Subject: Re: Regression in v4.0.0-rc1 with Android Binder In-Reply-To: Message-ID: References: User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="531381512-31614197-1425005989=:24302" Content-ID: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1961 Lines: 43 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --531381512-31614197-1425005989=:24302 Content-Type: TEXT/PLAIN; CHARSET=UTF-8 Content-Transfer-Encoding: 8BIT Content-ID: On Thu, 26 Feb 2015, Arve Hjønnevåg wrote: > > ----------8<---------- > > --- a/drivers/android/binder.c > > +++ b/drivers/android/binder.c > > @@ -601,6 +601,7 @@ static int binder_update_page_range(struct > > binder_proc *proc, int allocate, > > goto err_alloc_page_failed; > > } > > tmp_area.addr = page_addr; > > + tmp_area.flags &= ~VM_NO_GUARD; > > This variable is not initialized, so I would expect this to add a > warning. Setting it to VM_NO_GUARD and removing, " + PAGE_SIZE /* > guard page? */" fromt he next line would be better. However, the "new" > map_kernel_range_noflush api seems like a better api to use for this, > since it removes the need to create a dummy vm_struct at all. > Yeah, this is what you want to do and it's a bug in commit 71394fe50146 ("mm: vmalloc: add flag preventing guard hole allocation") that started to look at tmp_area.size without fixing up any of the callers when tmp_area.addr and tmp_area.size were only important in the past. It shouldn't take much work to make this use map_kernel_range_noflush(). > > tmp_area.size = PAGE_SIZE + PAGE_SIZE /* guard page? */; > > ret = map_vm_area(&tmp_area, PAGE_KERNEL, page); > > if (ret) { > > ---------->8---------- --531381512-31614197-1425005989=:24302-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/