Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp1747716pxt; Sat, 7 Aug 2021 23:50:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyBSmJwpZqqoIPM7P2jXGYEQKT9pp1AWosbBqgf56ngQR9SrJp8UcoSLg+5LPePWyrJsj+x X-Received: by 2002:a05:6402:1456:: with SMTP id d22mr22244343edx.143.1628405401969; Sat, 07 Aug 2021 23:50:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628405401; cv=none; d=google.com; s=arc-20160816; b=JkAO5KhpFd2rkSTcGrmOy7ko4VTPtOQzD62ZKdISO31kwDgRabb02O9J0WhcVK3w4i wusgQhYcBenEdKjVqOKhRfY2Kd6f/uO46IOjS1wRLAgo63ORHeFOZRMVAiVeA1Iwcnlp oV2rG+MMeDIU6EJQebIF0PVm38p0zh7JYLpH3J62sGAA8Bx4Vq11iC012flLiksbLrcF cqitZEE4vkaEkHZnhDDUI71UOyS1BallNqn57TbCDM52vFYHmefzoCGTMFoMpcZbjF7+ AS8TLu3eQJFGUg83XxB3zBpDfbMGjQ87zpUhSBX+znG3bhgtCc5rZB+fBpuzrz7SP/8g cKNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=YCTrQuxEKuc6M3GsxUyCG2Epy5r5UXCWoEm8o/X0JQo=; b=eMHdj5LCASi03sFFNPLcqxLyxvC3ohQT6plcBTQ5k3xE32ml1OZlc8alZzssI5OZn5 yMT1rCIuhDgLCDN+jowxPa4ZOAGdVJ/xalFiZCwR8NBu8gV/en2TmROEDO+FlNi1C2LE gzx4AGWTzm6QyzIStBnWcVfzLXlCVqcwSvhNTUyQGgY9bqyNF96ucNnuMc9uZ6HvNz3S BiV4PBa1onhj1dY7bedrGDkrv+kD6bPYoiWZ2Ph/REBOgCcDzllkE4WnAGlqDtysH+Eb W3p4hTOrAPyV4YwYO8YcMsbcUogxvkDPjSZ7MswFrJy4fis73VNdX1/0xCtFLRP/y8FJ tvCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=XIeiU8k3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b1si16746535ejb.152.2021.08.07.23.48.50; Sat, 07 Aug 2021 23:50:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=XIeiU8k3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230259AbhHHGrG (ORCPT + 99 others); Sun, 8 Aug 2021 02:47:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:35032 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229974AbhHHGrF (ORCPT ); Sun, 8 Aug 2021 02:47:05 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id A363E61078; Sun, 8 Aug 2021 06:46:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1628405207; bh=J+H89kyQcR5dOy0K8Ee87RHxbhy58yZy1lknQsKaTjU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=XIeiU8k329U0bGQdgPQ1IOzCzQpjS/R11b3QRjPE74OZf1l5KqY6Df6ALeCAM8MDr eTQkGRWZapacLyeH2xMqoQUTyeqJGN/1iYUhDNHfxhCUqYUrv/PD9U2zNHkXxNmpqj yogU50zoLBC3GSuBC1nK9N2nBKqpYmB4fJZqSUDI= Date: Sun, 8 Aug 2021 08:46:40 +0200 From: Greg Kroah-Hartman To: Joe Korty Cc: Zhen Lei , stable , Anna-Maria Gleixner , Mike Galbraith , Sasha Levin , Ingo Molnar , Peter Zijlstra , Thomas Gleixner , linux-kernel Subject: Re: [PATCH 4.4 00/11] Fix a potential infinite loop in RT futex-pi scenarios Message-ID: References: <20210802134624.1934-1-thunder.leizhen@huawei.com> <20210803005325.GA32484@zipoli.concurrent-rt.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210803005325.GA32484@zipoli.concurrent-rt.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 02, 2021 at 08:53:25PM -0400, Joe Korty wrote: > On Mon, Aug 02, 2021 at 09:46:13PM +0800, Zhen Lei wrote: > > Commit 73d786bd043e "futex: Rework inconsistent rt_mutex/futex_q state" > > mentions that it could cause an infinite loop, and will fix it in the later > > patches: > > bebe5b514345f09 futex: Futex_unlock_pi() determinism > > cfafcd117da0216 futex: Rework futex_lock_pi() to use rt_mutex_*_proxy_lock() > > > > But at the moment they're not backported. In a single-core environment, the > > probability of triggering is high. > > > > I also backported commit b4abf91047cf ("rtmutex: Make wait_lock irq safe"), > > it fixes a potential deadlock problem. Although it hasn't actually been > > triggered in our environment at the moment. > > > > Other patches are used to resolve conflicts or fix problems caused by new > > patches. > > > > > > Anna-Maria Gleixner (1): > > rcu: Update documentation of rcu_read_unlock() > > > > Mike Galbraith (1): > > futex: Handle transient "ownerless" rtmutex state correctly > > > > Peter Zijlstra (6): > > futex: Cleanup refcounting > > futex,rt_mutex: Introduce rt_mutex_init_waiter() > > futex: Pull rt_mutex_futex_unlock() out from under hb->lock > > futex: Rework futex_lock_pi() to use rt_mutex_*_proxy_lock() > > futex: Futex_unlock_pi() determinism > > futex,rt_mutex: Fix rt_mutex_cleanup_proxy_lock() > > > > Thomas Gleixner (3): > > futex: Rename free_pi_state() to put_pi_state() > > rtmutex: Make wait_lock irq safe > > futex: Avoid freeing an active timer > > > > include/linux/rcupdate.h | 4 +- > > kernel/futex.c | 245 +++++++++++++++++++++----------- > > kernel/locking/rtmutex.c | 185 +++++++++++++----------- > > kernel/locking/rtmutex_common.h | 2 +- > > 4 files changed, 262 insertions(+), 174 deletions(-) > > > To all concerned, > > I have verified that this series of patches, when applied > to 4.4.277, passes the futex-unlock-pi replicator I posted > to lkml on July 19. > > Subject: [BUG] 4.4.262: infinite loop in futex_unlock_pi (EAGAIN loop) > > Acked-by: Joe Korty > Thanks for testing and the series, all now queued up. I'll go do a -rc release with just this set of patches in it so that people can test it well. greg k-h