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=-10.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS 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 CE805C433E0 for ; Thu, 21 Jan 2021 22:46:31 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 636D223A5B for ; Thu, 21 Jan 2021 22:46:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 636D223A5B 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=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id CBD926B0006; Thu, 21 Jan 2021 17:46:30 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id C6C9B6B0007; Thu, 21 Jan 2021 17:46:30 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B82BB6B0008; Thu, 21 Jan 2021 17:46:30 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0176.hostedemail.com [216.40.44.176]) by kanga.kvack.org (Postfix) with ESMTP id A01896B0006 for ; Thu, 21 Jan 2021 17:46:30 -0500 (EST) Received: from smtpin03.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 5C7831F1A for ; Thu, 21 Jan 2021 22:46:30 +0000 (UTC) X-FDA: 77731267740.03.rule05_11022a227566 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin03.hostedemail.com (Postfix) with ESMTP id 3A73128A4E8 for ; Thu, 21 Jan 2021 22:46:30 +0000 (UTC) X-HE-Tag: rule05_11022a227566 X-Filterd-Recvd-Size: 2459 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf42.hostedemail.com (Postfix) with ESMTP for ; Thu, 21 Jan 2021 22:46:29 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id C867F23A61; Thu, 21 Jan 2021 22:46:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1611269188; bh=96Z526pBbuqUE3z3L6f5CHO9G46NkdGHX9wOnkYrw4o=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=FE+TJQtgLz9AxfV9MtnIhD3VwHTBtqYreaWHiScdgFDyz6n9wbVOgT2mEmSFbIygR 4CbK9MItXsgMkSQTaTZcTt2MIJiGWdOHDxZwNUK4xv4aP9XCRpfbNikb7cwSqidx+O jO82+MkbvdL6lGQGjFROcRNzMsB/tuy24+FKhUV8= Date: Thu, 21 Jan 2021 14:46:27 -0800 From: Andrew Morton To: Jarkko Sakkinen Cc: Tianjia Zhang , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , Shuah Khan , haitao.huang@intel.com, Kai Huang , x86@kernel.org, linux-sgx@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-kselftest@vger.kernel.org, Jia Zhang Subject: Re: [PATCH] mm: Optimizing error condition detection in do_mprotect_pkey() Message-Id: <20210121144627.64a60437fe97786596f389d0@linux-foundation.org> In-Reply-To: References: <20210118133310.98375-1-tianjia.zhang@linux.alibaba.com> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 Wed, 20 Jan 2021 16:29:20 +0200 Jarkko Sakkinen wrote: > > > On Mon, Jan 18, 2021 at 09:33:10PM +0800, Tianjia Zhang wrote: > > Obviously, the error variable detection of the if statement is > > for the mprotect callback function, so it is also put into the > > scope of calling callbck. > > > > Reported-by: Jia Zhang > > Signed-off-by: Tianjia Zhang > > No fixes tag, no description what this commit does. Nothing > makes sense to me. It's a little cleanup. Makes the flow at this site consistent with the other places where this function handles errors. I added a bit to the changelog mentioning this.