Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp6485267imu; Wed, 30 Jan 2019 15:55:55 -0800 (PST) X-Google-Smtp-Source: ALg8bN5lCgHbEeOPpyFzlFTxKBdbyZn1trEaG2lsmAV8kxHC8KmEpYZua3qrjPPwjs3OWkct4zdr X-Received: by 2002:a62:2f06:: with SMTP id v6mr33009886pfv.216.1548892555493; Wed, 30 Jan 2019 15:55:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548892555; cv=none; d=google.com; s=arc-20160816; b=iKaFAQz00GKVL9LNIg7cl//8TltttoGRtLBzRD9ANpybNVjQmFA0Lcrt7A7RYEatbp RjOrOx8GQy/GywpKxK+JliGNtpoAXSmt/c1ezFtBNVrPyq7qd3bV3eD/Igj1ttlcdtsw gGAD+QTZKUZlNTAy3v9tskhZFQGsAQ1hWLV5QzxNT7CCRme2HKtK26kmw0lIcOwxyx8J oTLFo6Sr23y3T4Wki6H7StKwnMoQ5aJlU1L7KT7XZVbk5STWK/tQFps1AHDoTClcv8or oZlA/sMqe+h84zgWgbESq+pxm8kDT5lmst4hP5YWQGEFcskaPX77lx2bUsw5iP6DUixG c/kg== 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=ijtSUcxqN/Y6sdXaoGKaJ+asGIviSpoJyebQ+a4P9aM=; b=ZIGoa4Fd6YMgItpr6IE/eT83MBrkDTSGK6iH0xBa/KQZZ21/Mw8AWBFtG6XjrkULJQ LcIv/8wswDFrXYGrZNm81GWLrIF/RkRWGcGuaEjgTzbDsUsxb3psYwtuz0d4oHlzmBgJ eVbgsnlxgp6M/dgcVGMOBWfwySYaH9uoA5YxU7RfseZT8kCyagnaOOFC+A6n/8A/Vx+L L7thFMzRIO8RWhvEFWPy+80QnET4xM6zz6w/uCL5nrgzocKoS21NzWYE9wCFURo6FwIR bjLhfYtJAKPMgdPrV1d/p2E9wZqoE0JIhRZ3zsQ+A/T9u0MY+j7hcpreB+b3hCXJsTxJ bwMA== 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 p12si2725365plk.77.2019.01.30.15.55.39; Wed, 30 Jan 2019 15:55:55 -0800 (PST) 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 S1727619AbfA3Xz0 (ORCPT + 99 others); Wed, 30 Jan 2019 18:55:26 -0500 Received: from Galois.linutronix.de ([146.0.238.70]:48411 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725828AbfA3Xz0 (ORCPT ); Wed, 30 Jan 2019 18:55:26 -0500 Received: from p5492e0d8.dip0.t-ipconnect.de ([84.146.224.216] helo=nanos) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1gozhP-0008S7-7V; Thu, 31 Jan 2019 00:55:19 +0100 Date: Thu, 31 Jan 2019 00:55:18 +0100 (CET) From: Thomas Gleixner To: "Paul E. McKenney" cc: Sebastian Sewior , Heiko Carstens , Peter Zijlstra , Ingo Molnar , Martin Schwidefsky , LKML , linux-s390@vger.kernel.org, Stefan Liebler Subject: Re: WARN_ON_ONCE(!new_owner) within wake_futex_pi() triggerede In-Reply-To: <20190130233557.GA4240@linux.ibm.com> Message-ID: References: <20190129171653.ycl64psq2liy5o5c@linutronix.de> <20190130094913.GC5299@osiris> <20190130125955.GD5299@osiris> <20190130132420.spwrq2d4oxeydk5s@linutronix.de> <20190130210733.mg6aascw2gzl3oqz@linutronix.de> <20190130233557.GA4240@linux.ibm.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 30 Jan 2019, Paul E. McKenney wrote: > On Thu, Jan 31, 2019 at 12:13:51AM +0100, Thomas Gleixner wrote: > > I might be wrong as usual, but this would definitely explain the fail very > > well. > > On recent versions of GCC, the fix would be to put this between the two > stores that need ordering: > > __atomic_thread_fence(__ATOMIC_RELEASE); > > I must defer to Heiko on whether s390 GCC might tear the stores. My > guess is "probably not". ;-) So I just checked the latest glibc code. It has: /* We must not enqueue the mutex before we have acquired it. Also see comments at ENQUEUE_MUTEX. */ __asm ("" ::: "memory"); ENQUEUE_MUTEX_PI (mutex); /* We need to clear op_pending after we enqueue the mutex. */ __asm ("" ::: "memory"); THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, NULL); 8f9450a0b7a9 ("Add compiler barriers around modifications of the robust mutex list.") in the glibc repository, There since Dec 24 2016 ... So the question is whether this is sufficient. That ordering only only matters vs. the thread itself and not for others. Thanks, tglx