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_PATCH, MAILING_LIST_MULTI,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 ADEB0C4338F for ; Tue, 3 Aug 2021 10:07:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 83C1B60E09 for ; Tue, 3 Aug 2021 10:07:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235288AbhHCKHr (ORCPT ); Tue, 3 Aug 2021 06:07:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49556 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235297AbhHCKHn (ORCPT ); Tue, 3 Aug 2021 06:07:43 -0400 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 449B9C061387 for ; Tue, 3 Aug 2021 03:07:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=4wevAMoON2BVeDaC/EUtZafrKn0BGHEDvZ9AiAWBsv8=; b=GwAp6t8DYiTSvCe9CTMEDq3whN PG0QRaWo/LVrHn3IEIzwzaQZXULuw5YWY0aAWKqStWCGM9KQURZtXmRXaDn0lG9LjgR62g1Q5UvuK LZ9VRLcPKAhTLNH2p+qvUqRPKtVXLJmHDSyhmjtNV5+IlpVcWgp3Qr+pMn0X6qj3RrmZ0YfpkCD6P sRoriF2uNYwB7SSm7V8X6D/c9WhLJbrjBHVw2eKEXy6V2ala0fJLcvV9iRhdttFQu10dVFQGir9CX 1FBkPYp8RJpN4AuNMPc0qbmWPBQmhbw3VRckiSMq12q5mBDPhafK3xLwbjuvo0pDpx/WT1lBxdedr R35yhBgA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=worktop.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1mArKI-005OHi-RV; Tue, 03 Aug 2021 10:07:11 +0000 Received: by worktop.programming.kicks-ass.net (Postfix, from userid 1000) id 249839862A4; Tue, 3 Aug 2021 12:07:13 +0200 (CEST) Date: Tue, 3 Aug 2021 12:07:13 +0200 From: Peter Zijlstra To: Thomas Gleixner Cc: LKML , Ingo Molnar , Juri Lelli , Steven Rostedt , Daniel Bristot de Oliveira , Will Deacon , Waiman Long , Boqun Feng , Sebastian Andrzej Siewior , Davidlohr Bueso Subject: Re: [patch 58/63] futex: Prevent requeue_pi() lock nesting issue on RT Message-ID: <20210803100713.GB8057@worktop.programming.kicks-ass.net> References: <20210730135007.155909613@linutronix.de> <20210730135208.418508738@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210730135208.418508738@linutronix.de> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 30, 2021 at 03:51:05PM +0200, Thomas Gleixner wrote: > @@ -219,6 +221,10 @@ struct futex_q { > struct rt_mutex_waiter *rt_waiter; > union futex_key *requeue_pi_key; > u32 bitset; > + atomic_t requeue_state; > +#ifdef CONFIG_PREEMPT_RT > + struct rcuwait requeue_wait; > +#endif > } __randomize_layout; > > static const struct futex_q futex_q_init = { Do we want to explicitly initialize requeue_state in futex_q_init? I was looking where we reset the state machine and eventually figured it out, but I'm thinking something more explicit might help avoid this for the next time.