Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1957111pxu; Fri, 18 Dec 2020 01:56:22 -0800 (PST) X-Google-Smtp-Source: ABdhPJyzVxwsxHxPS9XY2PQ6Rrg25Ao/50laPwgGdRj6q4y9msHO4/5WpAaHCoe7+Ra09+QwiXzi X-Received: by 2002:a17:906:408f:: with SMTP id u15mr3300604ejj.84.1608285382294; Fri, 18 Dec 2020 01:56:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608285382; cv=none; d=google.com; s=arc-20160816; b=S1X+dYBG8VLQUCE/WmRSCw13jF//0yV6XM+z3K3gp2LnOYSCq3+zHNdCjJTlaHAYEp ZO/Ugbo2ys9IX+HTTpsNyJ98coMcZQ2FI8limcJStXbY8HZUA8q6qM49qk/7darzB8UK 5OT6NQW6Geuj18c+RlULMhtM2ULbtHjDtwDpBxfpwoT0HWia2/PfgGn8qijZQcpWNBrb mYfUOA/ZjueTfn/+nfYcbh3qSd6os283VQ4URnY2WUAw5I7bq79jzdu7FSDs6KdaDQT8 tWNEHuvIlr9khAA238VOB6pvcMajnUdlUDMeeTwG37eZ2GbnmseIGjUGSAtybZw/WoqO Yzew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Gj+Ab4/r/K+F7TiCHgR5KM1JBO4iooikxV3r5qIMkN0=; b=TdaqXo0GH3fa6oeNtJsclOpjmPjr6SirEzQSIPaxpjslbEiCOt9cPwKEnwj2cl99Sz ptl+13yrBQ389gNv562T9dGMtMiiXuROR9m5N7F2/ePsBxaNNM+IgX72jTuUxWbmU6OZ 8reSepFuvJl+8vZ479sxmwk8JBc+l+B8tvUwCWF3VPa1LfIhpV/0JwJFokyoIalL1av/ DPgKLIYh2XpEr97ujmW9vPjxl6JAgcW5YnBdy5yyxCY7uDofurqonX8XVqWLXFF+Idj6 8xAB3eyA4vgrtKpSvzgbV7WmPCKBiT9H2eGJLhSbqJ5oS1MNFqlzR8QL1QRGqQbGHjSH /r6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=KJcwJZ+s; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c8si6520923edq.432.2020.12.18.01.55.59; Fri, 18 Dec 2020 01:56:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=KJcwJZ+s; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733086AbgLRJvs (ORCPT + 99 others); Fri, 18 Dec 2020 04:51:48 -0500 Received: from mx2.suse.de ([195.135.220.15]:59304 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728223AbgLRJvr (ORCPT ); Fri, 18 Dec 2020 04:51:47 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1608285061; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Gj+Ab4/r/K+F7TiCHgR5KM1JBO4iooikxV3r5qIMkN0=; b=KJcwJZ+sBdXaNQ5VKVFVQkK7bl/c8tbiCVjiliR5Os5TgKjMPWAjz+2k7x5fU1nE6a/PBZ +QI0pirc1UpbxYaHxXfpsgJr9c0oEEW3NCCIr+d0qT04FpI/uxC8UHMYN28b7HFPi2E6Gs hMhYREbNQXgKhgx9OYOkK8IZKE6en0o= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 112FFAC7B; Fri, 18 Dec 2020 09:51:01 +0000 (UTC) Date: Fri, 18 Dec 2020 10:50:58 +0100 From: Michal Hocko To: Pavel Tatashin Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, akpm@linux-foundation.org, vbabka@suse.cz, david@redhat.com, osalvador@suse.de, dan.j.williams@intel.com, sashal@kernel.org, tyhicks@linux.microsoft.com, iamjoonsoo.kim@lge.com, mike.kravetz@oracle.com, rostedt@goodmis.org, mingo@redhat.com, jgg@ziepe.ca, peterz@infradead.org, mgorman@suse.de, willy@infradead.org, rientjes@google.com, jhubbard@nvidia.com, linux-doc@vger.kernel.org, ira.weiny@intel.com, linux-kselftest@vger.kernel.org Subject: Re: [PATCH v4 07/10] mm/gup: change index type to long as it counts pages Message-ID: <20201218095058.GV32193@dhcp22.suse.cz> References: <20201217185243.3288048-1-pasha.tatashin@soleen.com> <20201217185243.3288048-8-pasha.tatashin@soleen.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201217185243.3288048-8-pasha.tatashin@soleen.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu 17-12-20 13:52:40, Pavel Tatashin wrote: > In __get_user_pages_locked() i counts number of pages which should be > long. Do we know of any caller who would like to pin so many pages it wouldn't fit into an int? I suspect this is more to sync types of nr_pages and the iterator right. It would be better to be explicit about this in the changelog. > Signed-off-by: Pavel Tatashin Acked-by: Michal Hocko > --- > mm/gup.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/mm/gup.c b/mm/gup.c > index 591d8e2dfc70..1ebb7cc2fbe4 100644 > --- a/mm/gup.c > +++ b/mm/gup.c > @@ -1481,7 +1481,7 @@ static long __get_user_pages_locked(struct mm_struct *mm, unsigned long start, > { > struct vm_area_struct *vma; > unsigned long vm_flags; > - int i; > + long i; > > /* calculate required read or write permissions. > * If FOLL_FORCE is set, we only require the "MAY" flags. > -- > 2.25.1 -- Michal Hocko SUSE Labs