From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751825AbdJIGnF (ORCPT ); Mon, 9 Oct 2017 02:43:05 -0400 Received: from merlin.infradead.org ([205.233.59.134]:49382 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751530AbdJIGnE (ORCPT ); Mon, 9 Oct 2017 02:43:04 -0400 Date: Mon, 9 Oct 2017 08:42:57 +0200 From: Peter Zijlstra To: Tejun Heo Cc: Boqun Feng , linux-kernel@vger.kernel.org, Josef Bacik , Lai Jiangshan Subject: Re: [RFC] workqueue: Fix irq inversion deadlock in manage_workers() Message-ID: <20171009064257.43lfvc4ey7xrr7hz@hirez.programming.kicks-ass.net> References: <20171008090225.27034-1-boqun.feng@gmail.com> <20171008190109.GX3301751@devbig577.frc2.facebook.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171008190109.GX3301751@devbig577.frc2.facebook.com> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Oct 08, 2017 at 12:03:47PM -0700, Tejun Heo wrote: > So, if I'm not mistaken, this is a regression caused by b9c16a0e1f73 > ("locking/mutex: Fix lockdep_assert_held() fail") which seems to > replace irqsave operations inside mutex to unconditional irq ones. No, it existed before that. You're looking at the DEBUG_MUTEX case, the normal case looked like: diff --git a/kernel/locking/mutex.h b/kernel/locking/mutex.h index 4410a4af42a3..6ebc1902f779 100644 --- a/kernel/locking/mutex.h +++ b/kernel/locking/mutex.h @@ -9,10 +9,6 @@ * !CONFIG_DEBUG_MUTEXES case. Most of them are NOPs: */ -#define spin_lock_mutex(lock, flags) \ - do { spin_lock(lock); (void)(flags); } while (0) -#define spin_unlock_mutex(lock, flags) \ - do { spin_unlock(lock); (void)(flags); } while (0) #define mutex_remove_waiter(lock, waiter, task) \ __list_del((waiter)->list.prev, (waiter)->list.next) Which is exactly what lives today.