From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755886AbdDEO6G (ORCPT ); Wed, 5 Apr 2017 10:58:06 -0400 Received: from terminus.zytor.com ([65.50.211.136]:58687 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752173AbdDEO5v (ORCPT ); Wed, 5 Apr 2017 10:57:51 -0400 Date: Wed, 5 Apr 2017 07:55:14 -0700 From: tip-bot for Mike Galbraith Message-ID: Cc: mingo@kernel.org, tglx@linutronix.de, efault@gmx.de, peterz@infradead.org, linux-kernel@vger.kernel.org, hpa@zytor.com Reply-To: peterz@infradead.org, linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@kernel.org, tglx@linutronix.de, efault@gmx.de In-Reply-To: <1491379707.6538.2.camel@gmx.de> References: <1491379707.6538.2.camel@gmx.de> To: linux-tip-commits@vger.kernel.org Subject: [tip:locking/core] Retiplockingcore_rtmutex_Deboost_before_waking_up_the_top_waiter Git-Commit-ID: 94247f76e7361afd85ba03a3f923bf3d07ba3017 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 94247f76e7361afd85ba03a3f923bf3d07ba3017 Gitweb: http://git.kernel.org/tip/94247f76e7361afd85ba03a3f923bf3d07ba3017 Author: Mike Galbraith AuthorDate: Wed, 5 Apr 2017 10:08:27 +0200 Committer: Thomas Gleixner CommitDate: Wed, 5 Apr 2017 16:52:10 +0200 Retiplockingcore_rtmutex_Deboost_before_waking_up_the_top_waiter mark_wakeup_next_waiter() already disables preemption, doing so again leaves us with an unpaired preempt_disable(). Fixes: 2a1c60299406 ("rtmutex: Deboost before waking up the top waiter") Signed-off-by: Mike Galbraith Cc: Peter Zijlstra Cc: xlpang@redhat.com Cc: rostedt@goodmis.org Link: http://lkml.kernel.org/r/1491379707.6538.2.camel@gmx.de Signed-off-by: Thomas Gleixner --- kernel/locking/rtmutex.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/kernel/locking/rtmutex.c b/kernel/locking/rtmutex.c index 0e641eb..b955094 100644 --- a/kernel/locking/rtmutex.c +++ b/kernel/locking/rtmutex.c @@ -1581,13 +1581,13 @@ bool __sched __rt_mutex_futex_unlock(struct rt_mutex *lock, return false; /* done */ } - mark_wakeup_next_waiter(wake_q, lock); /* - * We've already deboosted, retain preempt_disabled when dropping - * the wait_lock to avoid inversion until the wakeup. Matched - * by rt_mutex_postunlock(); + * We've already deboosted, mark_wakeup_next_waiter() will + * retain preempt_disabled when we drop the wait_lock, to + * avoid inversion prior to the wakeup. preempt_disable() + * therein pairs with rt_mutex_postunlock(). */ - preempt_disable(); + mark_wakeup_next_waiter(wake_q, lock); return true; /* call postunlock() */ }