From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932795Ab3CECR3 (ORCPT ); Mon, 4 Mar 2013 21:17:29 -0500 Received: from mail-ie0-f172.google.com ([209.85.223.172]:45763 "EHLO mail-ie0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758816Ab3CECR1 (ORCPT ); Mon, 4 Mar 2013 21:17:27 -0500 From: Michel Lespinasse To: linux-kernel@vger.kernel.org, Peter Zijlstra , Ingo Molnar , Oleg Nesterov , Lai Jiangshan , "Srivatsa S. Bhat" , paulmck@linux.vnet.ibm.com, Rusty Russell , rostedt@goodmis.org, tglx@linutronix.de, Andrew Morton , Andi Kleen Subject: [PATCH 0/2] tighten lglock lockdep annotations Date: Mon, 4 Mar 2013 18:17:23 -0800 Message-Id: <1362449845-7492-1-git-send-email-walken@google.com> X-Mailer: git-send-email 1.8.1.3 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Oleg Nesterov recently noticed that the lockdep annotations in lglock.c are not sufficient to detect some obvious deadlocks, such as lg_local_lock(LOCK) + lg_local_lock(LOCK) or spin_lock(X) + lg_local_lock(Y) vs lg_local_lock(Y) + spin_lock(X). Both issues can be fixed by indicating to lockdep that lglock's local locks are not recursive. Patch 1 introduces helper macros for lockdep annotations. Patch 2 makes sure to use the appropriate helper macros to indicate that the lglock local lock is a shared, non-recursive lock. Michel Lespinasse (2): lockdep: introduce lock_acquire_exclusive/shared helper macros lglock: update lockdep annotations to report recursive local locks include/linux/lockdep.h | 92 +++++++++++++------------------------------------ kernel/lglock.c | 12 +++---- 2 files changed, 29 insertions(+), 75 deletions(-) -- 1.8.1.3