From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 64D44C4361B for ; Fri, 18 Dec 2020 09:51:04 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id F04BC23A84 for ; Fri, 18 Dec 2020 09:51:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F04BC23A84 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 5AB236B005C; Fri, 18 Dec 2020 04:51:03 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 532E16B005D; Fri, 18 Dec 2020 04:51:03 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3F9736B0068; Fri, 18 Dec 2020 04:51:03 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0073.hostedemail.com [216.40.44.73]) by kanga.kvack.org (Postfix) with ESMTP id 2344B6B005C for ; Fri, 18 Dec 2020 04:51:03 -0500 (EST) Received: from smtpin05.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id D32FB3628 for ; Fri, 18 Dec 2020 09:51:02 +0000 (UTC) X-FDA: 77605934364.05.seed48_230bc992743c Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin05.hostedemail.com (Postfix) with ESMTP id B9B90181CBDA7 for ; Fri, 18 Dec 2020 09:51:02 +0000 (UTC) X-HE-Tag: seed48_230bc992743c X-Filterd-Recvd-Size: 2966 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf12.hostedemail.com (Postfix) with ESMTP for ; Fri, 18 Dec 2020 09:51:02 +0000 (UTC) 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> X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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