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=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no 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 0219FC433FE for ; Fri, 3 Sep 2021 19:01:23 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 6637760E77 for ; Fri, 3 Sep 2021 19:01:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 6637760E77 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 7CD5E6B0071; Fri, 3 Sep 2021 15:01:21 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 77C686B0072; Fri, 3 Sep 2021 15:01:21 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 670E86B0073; Fri, 3 Sep 2021 15:01:21 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0196.hostedemail.com [216.40.44.196]) by kanga.kvack.org (Postfix) with ESMTP id 57B956B0071 for ; Fri, 3 Sep 2021 15:01:21 -0400 (EDT) Received: from smtpin33.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 0231F1836C656 for ; Fri, 3 Sep 2021 19:01:21 +0000 (UTC) X-FDA: 78547180362.33.E267271 Received: from mail-lf1-f51.google.com (mail-lf1-f51.google.com [209.85.167.51]) by imf28.hostedemail.com (Postfix) with ESMTP id A138D9000511 for ; Fri, 3 Sep 2021 19:01:20 +0000 (UTC) Received: by mail-lf1-f51.google.com with SMTP id c8so225882lfi.3 for ; Fri, 03 Sep 2021 12:01:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=hpt968KhO5ktLt8YZKt9AMhba/VWw0L2qLvsN0Cw5fg=; b=SaHNhGpkehheSw6XhO8LZI4PTAvSrKZ3CEqIDKt6V2qAdoZV81tMwv/4VsBvkyNEPl rUU3bvS6GvgoKBxlXXFPz2lJEJVgcT4oWGuAQF9XtdaNIME+jJuu4hP1a7jmHC9p1Yqm JtkrvAdhcq3UFqWgynIoG6OgxZ5znHEQFeflM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=hpt968KhO5ktLt8YZKt9AMhba/VWw0L2qLvsN0Cw5fg=; b=JH2Fh4SUC/YJYLj6u8fsEdNCfZVppXmPIjtaun9P03quM9B59WcdZCti6QJxz0gQuM sdbeARigX3Xj9eK0fTNvMmFrKjMTaO3X0tTcDZR5yAT7zba4zzdp57Y1gOwJIgZmYwkI MUpNWRhHnON/vnrzeHESuYshvB+kRledgAckF2A7gU5YdLJw7Sk8SXQbC4gHJNLwg9tA pfeOIHFjcLTI+fDFmT6cmNdld/txxKeO0Ft5GzUJeHPFrZTySp/EOD5OmS7mMMNfiovK 4MAAQk9lxmAm2hKf3h7oKzsUieVL0mF81n8FY4WWjriQAEXJJlOf/5sZLufc2HsGp8Ns sbmA== X-Gm-Message-State: AOAM533P+0XnukRbUtGMzQLmrlpw8wVUKvk2rATRRGhVCFhzHF8KX2yD mIKST1HWr1D/nBVIqboMJN3IP9P6jCs3u1D4rWc= X-Google-Smtp-Source: ABdhPJzCcjY+mlDikPoxRoRLSoUqcmBwXqXhQ9Gub2lj8kTUAe9u2hysqH+Sk3Lb9wLX5VjCqFAOSw== X-Received: by 2002:a05:6512:1113:: with SMTP id l19mr256668lfg.559.1630695678431; Fri, 03 Sep 2021 12:01:18 -0700 (PDT) Received: from mail-lf1-f50.google.com (mail-lf1-f50.google.com. [209.85.167.50]) by smtp.gmail.com with ESMTPSA id p1sm29172lfs.10.2021.09.03.12.01.16 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 03 Sep 2021 12:01:17 -0700 (PDT) Received: by mail-lf1-f50.google.com with SMTP id p38so294785lfa.0 for ; Fri, 03 Sep 2021 12:01:16 -0700 (PDT) X-Received: by 2002:a05:6512:3da5:: with SMTP id k37mr267698lfv.655.1630695676700; Fri, 03 Sep 2021 12:01:16 -0700 (PDT) MIME-Version: 1.0 References: <20210902144820.78957dff93d7bea620d55a89@linux-foundation.org> <20210902215342.RcyFEb0qQ%akpm@linux-foundation.org> <5327ba7e-fe70-ed72-b372-254d516fd8ea@nvidia.com> In-Reply-To: <5327ba7e-fe70-ed72-b372-254d516fd8ea@nvidia.com> From: Linus Torvalds Date: Fri, 3 Sep 2021 12:01:00 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [patch 071/212] mm: gup: fix potential pgmap refcnt leak in __gup_device_huge() To: John Hubbard Cc: Andrew Morton , Claudio Imbrenda , Jan Kara , "Kirill A . Shutemov" , Miaohe Lin , Linux-MM , mm-commits@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=google header.b=SaHNhGpk; spf=pass (imf28.hostedemail.com: domain of torvalds@linuxfoundation.org designates 209.85.167.51 as permitted sender) smtp.mailfrom=torvalds@linuxfoundation.org; dmarc=none X-Stat-Signature: 36kxa7grbingt3cn8w9y7tp99p4wqepk X-Rspamd-Queue-Id: A138D9000511 X-Rspamd-Server: rspam04 X-HE-Tag: 1630695680-403139 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 Fri, Sep 3, 2021 at 10:55 AM John Hubbard wrote: > > On 9/3/21 9:35 AM, Linus Torvalds wrote: > > > > Hmm. I think "ret" is unnecessary, and this could just have been > > > > return addr == end; > > > > at the end to check that we did it all. > > Yes, definitely. > > So, to be extra clear even though this is tiny and trivial: this incremental > change, on top of the current patch, looks good to me: Ack. I did the merge of Andrew's series as-is, to avoid even more disruption (I already skipped two sub-series in there), but wouldn't mind this simplification. That said, it's not like it's a big deal, just me reacting to that patch being larger than strictly needed. It's not like the extra "ret" thing is confusing or wrong per se. So I'll leave it to others if they want to pursue this. Linus