From patchwork Thu Feb 26 22:04:32 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Pundir X-Patchwork-Id: 45205 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-we0-f199.google.com (mail-we0-f199.google.com [74.125.82.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 1CCC82043C for ; Thu, 26 Feb 2015 22:05:26 +0000 (UTC) Received: by wesw55 with SMTP id w55sf10658281wes.0 for ; Thu, 26 Feb 2015 14:05:25 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:mime-version:from:date:message-id :subject:to:cc:content-type:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=Af2AO3iC8QhIgrbopwxSVNgfyBT3EfYZ3Qvj0n+8zD8=; b=LXtfc+2WDariZ1FrvHwj1zOC/PEr9vVyzxOS9TdsGZGiZasrXepLXse7/EFfuduTo7 QNl6L5fJxd1DU6hP2iBUSJZmH/q0aFPCcgUa220cX64iGqKTdJQ/XiaqFxFjHTfoKIVy nA0gAJNYpmK3n38MIfeSmEQbvLYVhn/4XzNBjUFsqN8Q5VHFg9U9cSq7OG5qDF6XS01a MiMB8gE1ieo4rIblvrI1saRcmP/sR3e3JBSmDcSohJONSkJBhsMBOq9N/JQG+sLN1wO9 W2mOPYZjgNH7/LOBQ+BDA2SkiydXVW70jq+9JhA12mPagKmxNeR2GUpzu8Iy41MWIVTj ygSw== X-Gm-Message-State: ALoCoQn0B8F4R+QcD1sDL5ledu7xCcgtmfX5naSUp3j6kX1P5WBCFLbft0ILAtMtldAjbr3xH5we X-Received: by 10.181.29.66 with SMTP id ju2mr23750wid.1.1424988325093; Thu, 26 Feb 2015 14:05:25 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.4.131 with SMTP id k3ls100264lak.21.gmail; Thu, 26 Feb 2015 14:05:24 -0800 (PST) X-Received: by 10.152.116.43 with SMTP id jt11mr9529088lab.30.1424988324903; Thu, 26 Feb 2015 14:05:24 -0800 (PST) Received: from mail-la0-f43.google.com (mail-la0-f43.google.com. [209.85.215.43]) by mx.google.com with ESMTPS id f7si1632920lab.19.2015.02.26.14.05.24 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Feb 2015 14:05:24 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.43 as permitted sender) client-ip=209.85.215.43; Received: by labhv19 with SMTP id hv19so13817106lab.10 for ; Thu, 26 Feb 2015 14:05:24 -0800 (PST) X-Received: by 10.152.28.5 with SMTP id x5mr9548904lag.112.1424988324634; Thu, 26 Feb 2015 14:05:24 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.35.133 with SMTP id h5csp3559193lbj; Thu, 26 Feb 2015 14:05:23 -0800 (PST) X-Received: by 10.70.43.12 with SMTP id s12mr18533191pdl.25.1424988322178; Thu, 26 Feb 2015 14:05:22 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id qi10si2766194pbb.131.2015.02.26.14.05.20; Thu, 26 Feb 2015 14:05:22 -0800 (PST) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754571AbbBZWFP (ORCPT + 28 others); Thu, 26 Feb 2015 17:05:15 -0500 Received: from mail-ob0-f177.google.com ([209.85.214.177]:36373 "EHLO mail-ob0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752986AbbBZWFN (ORCPT ); Thu, 26 Feb 2015 17:05:13 -0500 Received: by mail-ob0-f177.google.com with SMTP id wp18so14060129obc.8 for ; Thu, 26 Feb 2015 14:05:12 -0800 (PST) X-Received: by 10.202.95.2 with SMTP id t2mr7294342oib.104.1424988312410; Thu, 26 Feb 2015 14:05:12 -0800 (PST) MIME-Version: 1.0 Received: by 10.76.57.130 with HTTP; Thu, 26 Feb 2015 14:04:32 -0800 (PST) From: Amit Pundir Date: Fri, 27 Feb 2015 03:34:32 +0530 Message-ID: Subject: Regression in v4.0.0-rc1 with Android Binder To: linux-kernel@vger.kernel.org Cc: 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, mingo@elte.hu, Thomas Gleixner , hpa@zytor.com, penberg@kernel.org, rientjes@google.com, gregkh@linuxfoundation.org, =?UTF-8?B?QXJ2ZSBIasO4bm5ldsOlZw==?= , riandrews@android.com, Serban Constantinescu , John Stultz , Sumit Semwal Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: amit.pundir@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.43 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Hi, I ran into series of following binder mmap failures with v4.0.0-rc1: ------------[ cut here ]------------ WARNING: CPU: 0 PID: 1971 at mm/vmalloc.c:130 vmap_page_range_noflush+0x119/0x144() CPU: 0 PID: 1971 Comm: healthd Not tainted 4.0.0-rc1-00399-g7da3fdc-dirty #157 Hardware name: ARM-Versatile Express [] (unwind_backtrace) from [] (show_stack+0x11/0x14) [] (show_stack) from [] (dump_stack+0x59/0x7c) [] (dump_stack) from [] (warn_slowpath_common+0x55/0x84) [] (warn_slowpath_common) from [] (warn_slowpath_null+0x17/0x1c) [] (warn_slowpath_null) from [] (vmap_page_range_noflush+0x119/0x144) [] (vmap_page_range_noflush) from [] (map_vm_area+0x27/0x48) [] (map_vm_area) from [] (binder_update_page_range+0x12f/0x27c) [] (binder_update_page_range) from [] (binder_mmap+0xbf/0x1ac) [] (binder_mmap) from [] (mmap_region+0x2eb/0x4d4) [] (mmap_region) from [] (do_mmap_pgoff+0x1e7/0x250) [] (do_mmap_pgoff) from [] (vm_mmap_pgoff+0x45/0x60) [] (vm_mmap_pgoff) from [] (SyS_mmap_pgoff+0x5d/0x80) [] (SyS_mmap_pgoff) from [] (ret_fast_syscall+0x1/0x5c) ---[ end trace 48c2c4b9a1349e54 ]--- binder: 1982: binder_alloc_buf failed to map page at f0e00000 in kernel binder: binder_mmap: 1982 b6bde000-b6cdc000 alloc small buf failed -12 Turned out that the following commit tripped off binder: ----------8<---------- commit 71394fe50146202f2c8d92cf50f5ebc761acf254 Author: Andrey Ryabinin Date: Fri Feb 13 14:40:03 2015 -0800 mm: vmalloc: add flag preventing guard hole allocation ---------->8---------- Explicitly disabling the vmalloc no guard (VM_NO_GUARD) flag in binder worked fine for me. So does a fix like this look reasonable enough to submit? ----------8<---------- if (ret) { ---------->8---------- Regards, Amit Pundir Tested-by: John Stultz Tested-by: Amit Pundir --- 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/ --- 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; tmp_area.size = PAGE_SIZE + PAGE_SIZE /* guard page? */; ret = map_vm_area(&tmp_area, PAGE_KERNEL, page);