Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp4178913ybi; Mon, 15 Jul 2019 05:08:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqz5yk/FttcWmmggT+t/p58US+4TjcZRpEI1n1PjN3kPD+ct9f7o8ORJ2QeeBRha9AKsIw79 X-Received: by 2002:a17:902:76c6:: with SMTP id j6mr27944498plt.102.1563192520410; Mon, 15 Jul 2019 05:08:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563192520; cv=none; d=google.com; s=arc-20160816; b=rzxB28Frg9xXddf9h91Oz5ukkIJY8/ycKPVHHy3b4YkwIVwoECIthXhZIylq4gexeY 8pq0C7ZWoTWFUY66v6yzA9ah1I5z/ww2K0K6ckdxoicKSawQSzPJGtrSpc/vV6Jgqsd9 9ZX1QQ0oK3tqaRUFeAdIjXE9OKKmW1lmWEiOygU71c5iGhyoPcjTX6c3eHIYZ6ZEgEIc iLCkNdCpol498w5LipQ94ZKKAFQk2tvw5pL9RJQ6GHAFTcID6JRqM/HUgypOjXhLTB9L ZkZBffNyxX+65QuO02k14nuvFOJFXp5amx5o4KFIPStvZ6GTjtZSHmKLWlDtY2yIhDlE zotw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=cl8fDId4/8QdGjR+ayI3FcLePor06MbJHULp8GCJKtk=; b=EVCBt4KSvxM3WERvEwBhkMO5gLPv1aHc15SUIS6ox+23N7u6p5EsPJJWobX0ZqlfV3 2duo331fpzdgFO5HGZ8JOW83FN2URcWaLlzo7YYwwETVm+koe5fzOO6LpTvc5+Mk/W6L j8+rM3u07MXaEqM/HS0Qjx/Ln0yRcOgmlBBQMB6yngVhsajeuPAGDPp7alcIe1Wwx4vB tce2aEV7i5HK/FBTt8kxb2QkU9uCvetbtscqKxBq9Xy8Ab0ZtFDAmEmpIaxHxQpjoHRI nXVRwb4RNfJMjE4pd49jThH/xREcpe8H4ERACJZChozXHGbV0XZnZU7GbIp8BuW961dL kNGA== 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 f9si16745342pgg.450.2019.07.15.05.08.20; Mon, 15 Jul 2019 05:08:40 -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 S1729958AbfGOMG3 (ORCPT + 99 others); Mon, 15 Jul 2019 08:06:29 -0400 Received: from mail-qk1-f195.google.com ([209.85.222.195]:41690 "EHLO mail-qk1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729827AbfGOMG3 (ORCPT ); Mon, 15 Jul 2019 08:06:29 -0400 Received: by mail-qk1-f195.google.com with SMTP id v22so11333503qkj.8; Mon, 15 Jul 2019 05:06:28 -0700 (PDT) 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=cl8fDId4/8QdGjR+ayI3FcLePor06MbJHULp8GCJKtk=; b=DeVNT+G+l2StUlKmVzi7UErSRUQYnDZcJ07Rf/j5h3QcvhayKMDntTHE0coV2LkXQf VJ4Z5n0tvSyzr4AyKwlNl7gjpKJJeFuFaiuXg838H0GMKS2ZGVK90P9+NM32FWqlDVnD nNos57HDPumJGVoF6Vpvg/RFDVX23wGXYJDkqfoiXS7Dsp2pUJlko8WhJaTKIe6p2a71 /b67FCxGrA2j1m1ImrVKp2WiTBbGGuU2LdsReI3Dn4x0Gi/cXARh0HIJy5S8rMM0B0Jo HgwO2929GaJBu6NZJoCwi2SMlXX8bswspSmHk8l0mWFOP+zDAxASYri/SqFO6OeB0wX0 DyaQ== X-Gm-Message-State: APjAAAXkEmRZbJXJmCcrGT/jcz0636uh7fkg5JrhzUN+4adepczs29r7 VhERosjdxHP1ZNdbF4xgnJ4WtKxjshxJ2nYDGDA= X-Received: by 2002:a37:4ac3:: with SMTP id x186mr15732795qka.138.1563192388030; Mon, 15 Jul 2019 05:06:28 -0700 (PDT) MIME-Version: 1.0 References: <7b963f9a-21b1-4c6d-3ece-556d018508b4@virtuozzo.com> <3d9eef14-4059-0f8a-e76f-a8a09d730913@virtuozzo.com> In-Reply-To: <3d9eef14-4059-0f8a-e76f-a8a09d730913@virtuozzo.com> From: Arnd Bergmann Date: Mon, 15 Jul 2019 14:06:10 +0200 Message-ID: Subject: Re: [PATCH] generic arch_futex_atomic_op_inuser() cleanup To: Vasily Averin Cc: Linux Kernel Mailing List , linux-arch , Thomas Gleixner , Ingo Molnar Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? Arnd