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=-5.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS,USER_AGENT_MUTT 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 DBBE4C43381 for ; Mon, 11 Mar 2019 22:11:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9A23B214AF for ; Mon, 11 Mar 2019 22:11:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1552342295; bh=OspF7dJWeZom0G4dQWpbJ57s4cSVwHJ5mLqwhMG68Bc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=UFAePRyqJLqJG/CRpVeFpgqjze1WnWBIxgY2RaJnnK5aYmUDcvaxX5v6Ik9jrHKvc eTwvGtzBTwWvJmSxNL9MVRn+F4TRsyYefZbl831D5DcAd4/W3t0gmx0IoEdGsr6mts i/ZF0EiGHbnBd3d04L4QPsZsbZb+eiba2USqlKN8= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727548AbfCKWLf (ORCPT ); Mon, 11 Mar 2019 18:11:35 -0400 Received: from mail.kernel.org ([198.145.29.99]:45376 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727527AbfCKWLf (ORCPT ); Mon, 11 Mar 2019 18:11:35 -0400 Received: from localhost (unknown [104.133.8.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1D3502087C; Mon, 11 Mar 2019 22:11:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1552342294; bh=OspF7dJWeZom0G4dQWpbJ57s4cSVwHJ5mLqwhMG68Bc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=k9V2ku8cYLKh2DPn/oicq7JMNJH9EWrplY6rvMFH16pFtYfrkbVtFrNKIy6ODjHa7 FTdO43cPQ6/G8/lFCYUt6s1l4lMexR2e8JinUBsKN2+Cql0iFf4rkxG82ZG/7yQNy0 uTNddS1umTfTn7Axzfj20CuNZx4lKY8RqeUGGQKo= Date: Mon, 11 Mar 2019 15:11:33 -0700 From: Greg KH To: Zubin Mithra Cc: stable@vger.kernel.org, groeck@chromium.org, tglx@linutronix.de, mingo@redhat.com, peterz@infradead.org, dvhart@infradead.org Subject: Re: [PATCH v4.9.y,v4.4.y v2] futex,rt_mutex: Restructure rt_mutex_finish_proxy_lock() Message-ID: <20190311221133.GA2970@kroah.com> References: <20190308211009.239345-1-zsm@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190308211009.239345-1-zsm@chromium.org> User-Agent: Mutt/1.11.3 (2019-02-01) Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org On Fri, Mar 08, 2019 at 01:10:09PM -0800, Zubin Mithra wrote: > From: Peter Zijlstra > > commit 38d589f2fd08f1296aea3ce62bebd185125c6d81 upstream > > With the ultimate goal of keeping rt_mutex wait_list and futex_q waiters > consistent it's necessary to split 'rt_mutex_futex_lock()' into finer > parts, such that only the actual blocking can be done without hb->lock > held. > > Split split_mutex_finish_proxy_lock() into two parts, one that does the > blocking and one that does remove_waiter() when the lock acquire failed. > > When the rtmutex was acquired successfully the waiter can be removed in the > acquisiton path safely, since there is no concurrency on the lock owner. > > This means that, except for futex_lock_pi(), all wait_list modifications > are done with both hb->lock and wait_lock held. > > [bigeasy@linutronix.de: fix for futex_requeue_pi_signal_restart] > > Signed-off-by: Peter Zijlstra (Intel) > Cc: juri.lelli@arm.com > Cc: bigeasy@linutronix.de > Cc: xlpang@redhat.com > Cc: rostedt@goodmis.org > Cc: mathieu.desnoyers@efficios.com > Cc: jdesfossez@efficios.com > Cc: dvhart@infradead.org > Cc: bristot@redhat.com > Link: http://lkml.kernel.org/r/20170322104152.001659630@infradead.org > Signed-off-by: Thomas Gleixner > Signed-off-by: Zubin Mithra > --- > Syzkaller reported a GPF in rt_mutex_top_waiter when fuzzing a 4.4 > kernel. The corresponding call trace is below: Now queued up, thanks. greg k-h