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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4E004C433F5 for ; Fri, 28 Jan 2022 06:16:09 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id CA4256B0074; Fri, 28 Jan 2022 01:16:08 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id C54546B007D; Fri, 28 Jan 2022 01:16:08 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AF4866B007E; Fri, 28 Jan 2022 01:16:08 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0033.hostedemail.com [216.40.44.33]) by kanga.kvack.org (Postfix) with ESMTP id 9D55F6B0074 for ; Fri, 28 Jan 2022 01:16:08 -0500 (EST) Received: from smtpin14.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 57AE19526A for ; Fri, 28 Jan 2022 06:16:08 +0000 (UTC) X-FDA: 79078685616.14.45C7A80 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf10.hostedemail.com (Postfix) with ESMTP id D17F0C0010 for ; Fri, 28 Jan 2022 06:16:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1643350566; h=from:from:reply-to:subject:subject: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=FSteX9W3PLWEuASmDON9me2d/UIiV3TbmFqzK6jQr4M=; b=EcoPvq+pyWk387WejmiLYIa4gL2i/5TfSILAOWxG4uV3E89G3uER3x+NHMFgNf4oG2275f dYVCo/Y1I68clupnW3dsP6a6xLnAQYvPzs+UDJXmclyF/zQmyeKbBNi2lAQdRkR0fwGujf IoYoP4icgJGQ2yKwFc5IGotICLX2J1E= Received: from mail-pf1-f197.google.com (mail-pf1-f197.google.com [209.85.210.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-613--kF8VRDKM8unDHLSEX8Wow-1; Fri, 28 Jan 2022 01:16:05 -0500 X-MC-Unique: -kF8VRDKM8unDHLSEX8Wow-1 Received: by mail-pf1-f197.google.com with SMTP id p16-20020aa78610000000b004c7cf2724beso2958555pfn.23 for ; Thu, 27 Jan 2022 22:16:04 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=FSteX9W3PLWEuASmDON9me2d/UIiV3TbmFqzK6jQr4M=; b=E6ym9hnmjv4UsguTNXBcgjb4UZSpd+y/g/cUZGlOaLzU3+aUW1b8eSrNRMbBqKDjNX 0beAFbi8eQfEo7Tlm+6czoOFXmQUPLWgswiOZLIeDdvCXTWYtL/4c1Y3e6cNgQLKob7W lpXEkWp25NnWS4F3zORKkErcxtSOjYjfQOJX1KFh2GCexnmaKsnu72iKamthICh36ipR /inXfBbutnyrmUtCrDzyM6TaxfhQe30imVuw78z/Y1vmls3t9QpjMt1A9PpCG3tGDOfU XfbJtiApnp935r6BPnlDhMUKvN95INQaU1zk9kcX2az4xvfkCcduUAS7ifN8o1T0u6BQ tFag== X-Gm-Message-State: AOAM531RqKQv/D6U0c2j8H/K72UaiBbuUzjGmd/MrVHv/mVHuHsE0AHj E+w4zqCbyKBkncMWPDbHEoNduz2Zd3ZeIGFGFQxc3qsZPseDM1yx63VQkhTGZHtVGa3aD/Sbgwx ZwjcJxGRzKNA= X-Received: by 2002:a17:90b:4c8e:: with SMTP id my14mr18040501pjb.243.1643350564128; Thu, 27 Jan 2022 22:16:04 -0800 (PST) X-Google-Smtp-Source: ABdhPJzBh69AF7fxpG19IrHi85o0ocI89x0eLeIZI+GAD7OdM5Lf69TwqdWkDCY/AsuxNlDs5C7u6A== X-Received: by 2002:a17:90b:4c8e:: with SMTP id my14mr18040465pjb.243.1643350563714; Thu, 27 Jan 2022 22:16:03 -0800 (PST) Received: from xz-m1.local ([94.177.118.75]) by smtp.gmail.com with ESMTPSA id z13sm7923190pfe.20.2022.01.27.22.16.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Jan 2022 22:16:03 -0800 (PST) Date: Fri, 28 Jan 2022 14:15:56 +0800 From: Peter Xu To: John Hubbard Cc: Jason Gunthorpe , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrew Morton , Andrea Arcangeli , Jan Kara , =?utf-8?B?SsOpcsO0bWU=?= Glisse , "Kirill A . Shutemov" , Alex Williamson Subject: Re: [PATCH] mm: Fix invalid page pointer returned with FOLL_PIN gups Message-ID: References: <20220125033700.69705-1-peterx@redhat.com> <20220127004206.GP8034@ziepe.ca> <20220127152538.GQ8034@ziepe.ca> <20220128023127.GR8034@ziepe.ca> MIME-Version: 1.0 In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Disposition: inline X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: D17F0C0010 X-Stat-Signature: g6biumq7kpjckr3z5og6sm4sbh7xn18r Authentication-Results: imf10.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=EcoPvq+p; dmarc=pass (policy=none) header.from=redhat.com; spf=none (imf10.hostedemail.com: domain of peterx@redhat.com has no SPF policy when checking 170.10.129.124) smtp.mailfrom=peterx@redhat.com X-Rspam-User: nil X-HE-Tag: 1643350567-542663 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000005, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Thu, Jan 27, 2022 at 09:57:34PM -0800, John Hubbard wrote: > On 1/27/22 19:26, Peter Xu wrote: > ... > > I see that both you and John has a strong preference on at least the > > WARN_ON_ONCE() in the patch. > > > > Do you think it's okay I repost with only the one-liner fix, which will keep > > the Fixes but drop the WARN_ON_ONCE? Then we can leave the rest as follow up. > > > > I think that's OK with me, anyway. You'll recall that I initially requested > that you split this into two patches, after all. > > Would you like me to post a follow-up that does the refactoring that Jason > and I are requesting? I see that we have some fundamental differences in > opinion about how this should be done, so rather than drive you crazy with > debating, maybe that would be smoother? :) Sure thing. :-) Please just double check that the pud devmap will still always work on mlock(). I believe both of you are much more familiar than me on that; it just still seems a little bit tricky. I'll repost this one, thanks. -- Peter Xu