Received: by 10.192.165.156 with SMTP id m28csp637825imm; Fri, 13 Apr 2018 05:27:10 -0700 (PDT) X-Google-Smtp-Source: AIpwx48V6KpOLst7GhuWx/+CcpxIhby5pDimSg6c2pJuwgnTQg+j5DXbXhvicuPRx1Ia0hWthlv0 X-Received: by 10.101.96.65 with SMTP id b1mr4079061pgv.340.1523622430083; Fri, 13 Apr 2018 05:27:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523622430; cv=none; d=google.com; s=arc-20160816; b=MGqhaCLFuWpIbFlYLruostRd1G9mRpWWgQB0bUbIEQcZKr2RGuvTiRvn/FSu6tvSbQ NjsbxmcmZhj9m6yh6iaKWbYB6Xf8cvV8CIQydN6wRKfmMofZcpMM372Ju9lPhWxzdgNz zVYsO+0A3L0lBEI31RxLEkaGsQL/5J5qR2NSTAvzGUPwiY3TOmKurJFwN+DR+GTbcLKx nbg7vnS0iZ+GyZSJlv5tLqjZMYccf40pxNWZdutwMRhWaNq+5vfmO8CHNEHEdDkvIJ5B fABauDtpjJ23PPxUrc4w8pZ9vF1eFyRoAM6a4cl6R2bAODSJfTc4p1UiPcBc+EEXYb+f qUjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dmarc-filter:dkim-signature:dkim-signature :arc-authentication-results; bh=fr2fqTQRDVODc1SMjus5V1/WKRBbFB85WGBC/maA5Rw=; b=hPVRqpCsBx38pjSP+CqN8DDfNrEyrePNI9rdSx5cDKZYHV6DEzPXS18YyqC+RsagD1 qALaYyQyUmdd5FsUbZ3e+dePYXM376IbSelmCiEvxQhrdJc3YPHIVk1M8xfV8d/z2eN3 lNHH6QzL2pzgGKGPN4VXGU5ujWvnBJ0S3EzTLeVjtQBdkY8JDIwxEgIBwT65Rhah28NB xz/XuthnzHSnSwnbGtUXe30H+uFJKx2ZrZANONb+RzM9XEYPVbADDOMmj/UdjLuva2JL IY4SgiJWAwqr0mIpWC51wMUb7aWetnPVHG6gj7asfT0baCg8DXR7xnNuxdVUis561a+1 ofyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=F0g0b9yQ; dkim=pass header.i=@codeaurora.org header.s=default header.b=QFik6vWb; 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 n59-v6si5414087plb.46.2018.04.13.05.26.54; Fri, 13 Apr 2018 05:27:10 -0700 (PDT) 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=@codeaurora.org header.s=default header.b=F0g0b9yQ; dkim=pass header.i=@codeaurora.org header.s=default header.b=QFik6vWb; 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 S1754516AbeDMLeX (ORCPT + 99 others); Fri, 13 Apr 2018 07:34:23 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:39590 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754474AbeDMLeV (ORCPT ); Fri, 13 Apr 2018 07:34:21 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id AC02560FED; Fri, 13 Apr 2018 11:34:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1523619260; bh=nUXO/3Acd/bdqu9+uNv8OYQcBNsQ6UrDow5KhixHBkQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=F0g0b9yQgYZx3nTlQ5HZe5iGCIyX6VdpIo7Vvwize4lVbtiJ1WvEhlqQj0FYwlXLG bmJmYPlaCrij16k+TaVm6A7hr2OLjgYacGMqndlUk+irVlVWX8qMDdQHeKUNdgA/yc wJM996ExvdaNJFuIopbQRsARc76UH+PsxKtIvDPs= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from cpandya-linux.qualcomm.com (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: cpandya@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 59D9D60FED; Fri, 13 Apr 2018 11:34:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1523619259; bh=nUXO/3Acd/bdqu9+uNv8OYQcBNsQ6UrDow5KhixHBkQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QFik6vWbeGgqucVxGd0RGvmkdjNGZAtB+SokBuqOiUn2hnKYfCnTMGnJcEys19ztB jkCBbZbPBjcOrOEJWWi8N+1W5uHivQiLgEzNZM9U0tVzTrATXnZ8bg083Gr4SOGP+f fw0vd7rtPTJpFOMgrDJ60kXerEP7w2GicIv2wDjk= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 59D9D60FED Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=cpandya@codeaurora.org From: Chintan Pandya To: vbabka@suse.cz, labbott@redhat.com, catalin.marinas@arm.com, hannes@cmpxchg.org, f.fainelli@gmail.com, xieyisheng1@huawei.com, ard.biesheuvel@linaro.org, richard.weiyang@gmail.com, byungchul.park@lge.com Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Chintan Pandya Subject: [PATCH 2/2] mm: vmalloc: Pass proper vm_start into debugobjects Date: Fri, 13 Apr 2018 17:03:54 +0530 Message-Id: <1523619234-17635-3-git-send-email-cpandya@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1523619234-17635-1-git-send-email-cpandya@codeaurora.org> References: <1523619234-17635-1-git-send-email-cpandya@codeaurora.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Client can call vunmap with some intermediate 'addr' which may not be the start of the VM area. Entire unmap code works with vm->vm_start which is proper but debug object API is called with 'addr'. This could be a problem within debug objects. Pass proper start address into debug object API. Signed-off-by: Chintan Pandya --- mm/vmalloc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/vmalloc.c b/mm/vmalloc.c index 9ff21a1..28034c55 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -1526,8 +1526,8 @@ static void __vunmap(const void *addr, int deallocate_pages) return; } - debug_check_no_locks_freed(addr, get_vm_area_size(area)); - debug_check_no_obj_freed(addr, get_vm_area_size(area)); + debug_check_no_locks_freed(area->addr, get_vm_area_size(area)); + debug_check_no_obj_freed(area->addr, get_vm_area_size(area)); remove_vm_area(addr); if (deallocate_pages) { -- Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc., is a member of Code Aurora Forum, a Linux Foundation Collaborative Project