Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp4255250ybi; Mon, 15 Jul 2019 06:17:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqyD6qf6YbvDPDlZeFcVR6D/OQcYeMgu8nB/0B5DCl7LFGJVc0Uw7jBFdbe/q9DRcolxoaRN X-Received: by 2002:a63:4006:: with SMTP id n6mr25450652pga.403.1563196648214; Mon, 15 Jul 2019 06:17:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563196648; cv=none; d=google.com; s=arc-20160816; b=ekrYx42CvL6hazXsJgrU36wJOUOdS3Wg4KD72m8UDi3zxUyNIvLJLSSQ3rrFdrl2Q8 sZgV02hDcR1NtwPNR8HNW0GhvkAFC6CnFrT0jeevhC1JB9yExokJO7iuMnW1tS6RvC5P xP5imwXQUmLFa6+8buD7dBcPuVi/N6eGAnmrSQI6nW/gxUcKZlh6VjAzT66P1zkUI8rZ 7H/rQ6Nu8ELhh+Pb9JA2kGvrUk9uLdCVcs7aDCiMAzjMMLIj4USE7x6lQ0bWJxMFzDu8 yx684AOsF+fzmoKne2ntwMWakGifu2lmcR7+33c3xW8b2JPc3csrKNpCJbW/IRRMr4fU LAPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=G0xzShZ8ehiz6SboHrD/R3JJ6PBLvdHGD05OBzw4VKk=; b=cQYZBuVyPBsXjJa8jmXaNdVKv3qHUfkxeu/i5BmxurYZq4Yf+5AFC/aDVoSuacIQG0 MKxUNJqQC3rNjexeQBKWTD/nAOFDL8UsPnkoaz5MtFASaHoNhmDzW8uflLuvybg0SWNb DOHxGNHfzaRU5BcZssVtEYxhiEKEn6i+RkBOHpm0DRaKvj4uIBTg8KNIqycah6ONFOhT vkOCn2859HZDJGzvhfeJao4vJ4YivDGXh2R3tOzLCp1Jo9lVa3mq7GjzbxTOPVr8rU4X 4021AU1Dwzc2cJ8uzACcbQI89J89X4lwRzEz9ZAFkNC4WZIGgKeedE/POJE9fNWHyfiR kKuw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id cj14si15438971plb.141.2019.07.15.06.17.07; Mon, 15 Jul 2019 06:17:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730173AbfGONPN (ORCPT + 99 others); Mon, 15 Jul 2019 09:15:13 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:47673 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730012AbfGONPN (ORCPT ); Mon, 15 Jul 2019 09:15:13 -0400 Received: from [5.158.153.52] (helo=nanos.tec.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1hn0ow-0006aM-PJ; Mon, 15 Jul 2019 15:15:10 +0200 Date: Mon, 15 Jul 2019 15:15:10 +0200 (CEST) From: Thomas Gleixner To: Arnd Bergmann cc: Vasily Averin , Linux Kernel Mailing List , linux-arch , Ingo Molnar Subject: Re: [PATCH] generic arch_futex_atomic_op_inuser() cleanup In-Reply-To: Message-ID: References: <7b963f9a-21b1-4c6d-3ece-556d018508b4@virtuozzo.com> <3d9eef14-4059-0f8a-e76f-a8a09d730913@virtuozzo.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 15 Jul 2019, Arnd Bergmann wrote: > On Mon, Jul 15, 2019 at 12:29 PM Vasily Averin wrote: > > > > Looks like this code is dead and therefore looks strange. > > I've found it during manual code review and decided to send patch > > to pay your attention to this problem. > > Probably it's better to remove this code at all? > > > > On 7/15/19 1:27 PM, Vasily Averin wrote: > > > Access to 'op' variable does not require pagefault_disable(), > > > 'ret' variable should be initialized before using, > > > 'oldval' variable can be replaced by constant. > > > > > > Signed-off-by: Vasily Averin > > I'm not following the reasoning for any of the changes here. Why do you > think we don't need the pagefault_disable() around get_user()/put_user(), > and which part of the funtion is dead code? All of it. If you change the function to { return -ENOSYS; } then it is equivalent (except for the pointless pagefault_disable/enable() pair which protects absolutely nothing). Thanks, tglx