Received: by 10.223.176.5 with SMTP id f5csp614260wra; Tue, 6 Feb 2018 04:38:28 -0800 (PST) X-Google-Smtp-Source: AH8x226x+H3qFDQGdgRCVGyncddo8QEAZewnBZc4H+0fUcNDnQZ0xo+GGnDaq8GHrj/PEJ/TFYZd X-Received: by 2002:a17:902:33c1:: with SMTP id b59-v6mr2363522plc.111.1517920708491; Tue, 06 Feb 2018 04:38:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517920708; cv=none; d=google.com; s=arc-20160816; b=Y11Ubarjwr3UlQrVv98+zlcwPH8vrGbmM/ysoagKbq69vZwcYhVuqw7MoBRLbqXPyc 5UIiN1DHB2EbMkTqENH6hwYN4SLarRdX0NZEzTgerXy3RG33G8ib3fnGBz61cYkMejVi yw13onhhNzRmGF0qn6fhJzWvb2msoyXiB60xEsQzPvUUp8ZRK/BgeLtAyvT+nPkbySII pzf6uUrr2x52JQCLwet3r8YXOwoYKe1vhne4MlEO37hPEpEAb41/hObezUVCpAus2Ouz REY/toRiNLGN1ycGoSfgnVopwCb3W1SUXOeySq/m8eVsv/C96YA4geu7SgoPV5IJW3tV FVGg== 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=atjfp5JR0cRASKvKmF9XjbENSYkPVRFBL1h1ugyZxI0=; b=bTY2LJ9zR3wCqNDodiUJBNTlnRjU8yQ7S4yxrdAyfhXWK3HECN82jLcxIUGN5ahaK3 oLrLoeoiz59lq/5ob9IHS/XAFtkAUI/TAyHeJyajFFkI828I1wVF4eLdJAP1Wrf051bE Rij/Sr3vZugs4XJUkkQndHkPpciwnRsFQrmdIY7nPlEE05PIEqZPC0fXDZgGcQRNwrkb csuZzwjBpgKF16qcjEOkX7+vPeRyE55gqEmjAHDs/aq5/BpdbK+PLPltZ2FTi0v6MgPE 63D781QeVKFWxb2qHJ3JqvHIEw4zZ2CHY8numn+1qJeRoxl0Akz01tMHls57G+5LdcIb 9xIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=Kfr/IWxz; 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 p26si3544018pge.348.2018.02.06.04.38.13; Tue, 06 Feb 2018 04:38:28 -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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=Kfr/IWxz; 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 S1752788AbeBFMhq (ORCPT + 99 others); Tue, 6 Feb 2018 07:37:46 -0500 Received: from bombadil.infradead.org ([65.50.211.133]:53229 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752246AbeBFMhk (ORCPT ); Tue, 6 Feb 2018 07:37:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=atjfp5JR0cRASKvKmF9XjbENSYkPVRFBL1h1ugyZxI0=; b=Kfr/IWxzGKpc6QZwi0i4SCNP+ vrHjgB3w+ZlImODn1gJPWmOnUD9bcKhTVguiB/qUbepfMKNZLpzmWtdUsfnOgUzutGIhG/cZVb07V 9CIVowYiIqLy2K8HuV93MMgcFMuaOTEqOhpZM/vYAhamzM1jbIO3yVJESq3qdt4hL2VtsQdwhLsOL 1h7++vxnq83FBjHScDWCT1XfEYPKopb46JOsV7KtMyO3fGuuC8dnUukbz5BNLyN/heaCyV+HiqdEQ UNtsZFyYmIS9hjrDB+/aG4rDuKJMMPg4UxCDWXF7Vyd5S84eiw9iRl+4HfSL47GjGHGlzNHsrqKnH gnV/cLH3Q==; Received: from willy by bombadil.infradead.org with local (Exim 4.89 #1 (Red Hat Linux)) id 1ej2VE-0007Gh-3l; Tue, 06 Feb 2018 12:37:36 +0000 Date: Tue, 6 Feb 2018 04:37:35 -0800 From: Matthew Wilcox To: Igor Stoppa Cc: jglisse@redhat.com, keescook@chromium.org, mhocko@kernel.org, labbott@redhat.com, hch@infradead.org, cl@linux.com, linux-security-module@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, kernel-hardening@lists.openwall.com Subject: Re: [PATCH 3/6] struct page: add field for vm_struct Message-ID: <20180206123735.GA6151@bombadil.infradead.org> References: <20180130151446.24698-1-igor.stoppa@huawei.com> <20180130151446.24698-4-igor.stoppa@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180130151446.24698-4-igor.stoppa@huawei.com> User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 30, 2018 at 05:14:43PM +0200, Igor Stoppa wrote: > @@ -1744,6 +1748,7 @@ void *__vmalloc_node_range(unsigned long size, unsigned long align, > const void *caller) > { > struct vm_struct *area; > + unsigned int page_counter; > void *addr; > unsigned long real_size = size; > > @@ -1769,6 +1774,9 @@ void *__vmalloc_node_range(unsigned long size, unsigned long align, > > kmemleak_vmalloc(area, size, gfp_mask); > > + for (page_counter = 0; page_counter < area->nr_pages; page_counter++) > + area->pages[page_counter]->area = area; > + > return addr; > LOCAL variable names should be short, and to the point. If you have some random integer loop counter, it should probably be called ``i``. Calling it ``loop_counter`` is non-productive, if there is no chance of it being mis-understood. Similarly, ``tmp`` can be just about any type of variable that is used to hold a temporary value. (Documentation/process/coding-style.rst)