Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp350735ybi; Fri, 24 May 2019 04:58:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqw3Lvy+ml5iypdR9F+tOT9I1scB27jn9CVYrMUN3wUUTmZ5igjZpgD7uTrFnvW8IJElG2y3 X-Received: by 2002:a62:5b81:: with SMTP id p123mr113711140pfb.158.1558699116703; Fri, 24 May 2019 04:58:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558699116; cv=none; d=google.com; s=arc-20160816; b=cS4bI4nLt7vNDYdFBv9yUHvwP7b4FSp393q7G7TJyhAT6N6MQXQ0fjNhsqPXV+SS4Q nEEQ4EKswr0Uf7un6xmBiBa8KuyWv0CB71aV+PVNErpc2IpUcK3SRC5IhuuxDTOzduYw 6rXLm8YDvWQnbTClyfN33d8gwlLs84InxRXELxIG7j5sPsHfUT42nlnmJ7Mn1mELR9FI o1G7APs6MUQ6CfB46tw2SnWlSsGGNxaW9otMQXvbOPjzxV7gogXY/8ffdc0oYxyfSL+H OeV/2dD0tTV3hgDnFwd/gVuTZmItXcTAYikoRYzUmZPqDlOqpqV3c/z+6miLWve5FcAj ledA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=fIH1V2TkOLOizahELZLm8HyLwy2aaFtFRBz9J0PeBqw=; b=Cl572t4HS98xnypup5OaXS5pOeoRWtqU4c4WduiGLetLPs4h3OksDwRXhUF9bpAVYl ILU5/syBwql1DutfrCL6UQGgy8+bIt15qiRGsayirh2cYg3mNLa/y7ewc9UmJobBlgfp PwTnt92Ol8sxvd08JzvB5nB8Dcfa9VVk7OKQL65EiU2356q1bCvOGkVVBGFAdaRFziQQ hXLQyzJoV4oyFkXWlZ1swJ6wHn+XuDY7HgmBDuWd0tex7PDEhBP6VwnTyXsOD+C4uCkh zzC4sinQCvaA/MyyBQ8LEpvtTrRvAtmNMJGl4E5ZuG69jV89bpGQ1nzWZ95DAVwpJbak 05Yg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="BxxRly/a"; 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 n4si3752487pgq.69.2019.05.24.04.58.21; Fri, 24 May 2019 04:58:36 -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; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="BxxRly/a"; 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 S2391323AbfEXL4U (ORCPT + 99 others); Fri, 24 May 2019 07:56:20 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:46981 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391289AbfEXL4U (ORCPT ); Fri, 24 May 2019 07:56:20 -0400 Received: by mail-wr1-f67.google.com with SMTP id r7so9702477wrr.13 for ; Fri, 24 May 2019 04:56:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=fIH1V2TkOLOizahELZLm8HyLwy2aaFtFRBz9J0PeBqw=; b=BxxRly/ajvZLSzLtmSK61bITxGipmBwL2OJdeWQO3mNyXxtVS8CEil/Hq9l4iMDC/B VEFZDVNkjxzqX0zbqaeHVXVNhpOn9cAJzdlqNPCzBx+7o6QywsG/hAWe603Bqw6bhPEs LDmeY9vGcEAOtfqf3dCRVdOkTV+JzURsWeF6c= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=fIH1V2TkOLOizahELZLm8HyLwy2aaFtFRBz9J0PeBqw=; b=Apo+cTe17mtEokulMXob54Jr52rXAwkAS2ICmQ6S+YJqEunNXI+3Noisb+rt2bhVZ/ bsduH2d5KDFKeZpCvTuGzxm1oB/ZWgHA9qHuFijsbCztpslvfdS37q0BqLA0JtRJ3Gry XGoEd4YqveK1/QzbUrAbwtUufHnZD8LQXWCxY8m0wlFGVSE5oKK9vYilKIllLtFDNPZX oQ8+y/rqtLeqTbs+gDr3HhPcAN6fmcnc0HQcUKiskhEOk5WH5DZt38Wlmr0oByNmU575 oKBB3FIoGZGFL+KLGmAaHPUeiieHLg7o3lUma4yDGJGga6LoU8Hd7bRVHDrr9TWtYTKK +Prw== X-Gm-Message-State: APjAAAUsqcKvhF2lx0gYcOkgWbuz/6xekw3Oh+t5bLYvYuOCABy8v41B XpnOK+Ch12O/TfuAz/pRo5CBMA== X-Received: by 2002:adf:e90b:: with SMTP id f11mr7526503wrm.291.1558698978195; Fri, 24 May 2019 04:56:18 -0700 (PDT) Received: from andrea (86.100.broadband17.iol.cz. [109.80.100.86]) by smtp.gmail.com with ESMTPSA id 91sm2540053wrs.43.2019.05.24.04.56.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 24 May 2019 04:56:17 -0700 (PDT) Date: Fri, 24 May 2019 13:56:12 +0200 From: Andrea Parri To: Peter Zijlstra Cc: linux-kernel@vger.kernel.org, Arnd Bergmann , Greg Kroah-Hartman , Jorgen Hansen , Will Deacon , Mark Rutland , "Paul E. McKenney" Subject: Re: [PATCH 1/2] vmw_vmci: Clean up uses of atomic*_set() Message-ID: <20190524115612.GA21365@andrea> References: <1558694136-19226-1-git-send-email-andrea.parri@amarulasolutions.com> <1558694136-19226-2-git-send-email-andrea.parri@amarulasolutions.com> <20190524103934.GO2606@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190524103934.GO2606@hirez.programming.kicks-ass.net> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 24, 2019 at 12:39:34PM +0200, Peter Zijlstra wrote: > On Fri, May 24, 2019 at 12:35:35PM +0200, Andrea Parri wrote: > > The primitive vmci_q_set_pointer() relies on atomic*_set() being of > > type 'void', but this is a non-portable implementation detail. > > > > Reported-by: Mark Rutland > > Signed-off-by: Andrea Parri > > Cc: Arnd Bergmann > > Cc: Greg Kroah-Hartman > > Cc: Jorgen Hansen > > Cc: Peter Zijlstra > > Cc: Will Deacon > > Cc: Mark Rutland > > Cc: "Paul E. McKenney" > > --- > > include/linux/vmw_vmci_defs.h | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/include/linux/vmw_vmci_defs.h b/include/linux/vmw_vmci_defs.h > > index 0c06178e4985b..eb593868e2e9e 100644 > > --- a/include/linux/vmw_vmci_defs.h > > +++ b/include/linux/vmw_vmci_defs.h > > @@ -759,9 +759,9 @@ static inline void vmci_q_set_pointer(atomic64_t *var, > > u64 new_val) > > { > > #if defined(CONFIG_X86_32) > > - return atomic_set((atomic_t *)var, (u32)new_val); > > + atomic_set((atomic_t *)var, (u32)new_val); > > #else > > - return atomic64_set(var, new_val); > > + atomic64_set(var, new_val); > > #endif > > } > > All that should just die a horrible death. That code is crap. > > See: > > lkml.kernel.org/r/20190524103731.GN2606@hirez.programming.kicks-ass.net I see, that was indeed 'racy' with my patch! ;-) Thank you! Andrea