diff mbox

suspect locking in net/irda/iriap.c

Message ID 20110606.170056.193694265.davem@davemloft.net
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

David Miller June 7, 2011, midnight UTC
From: Dave Jones <davej@redhat.com>
Date: Wed, 20 Apr 2011 23:40:58 -0400

> My reading of that comment suggests that the two locks aren't the same,
> so is this just missing a lockdep annotation ?

Dave, I'm going to check in the following to net-2.6 to try and
address this.  Let me know how it works for you.

--------------------
irda: iriap: Use seperate lockdep class for irias_objects->hb_spinlock

The SEQ output functions grab the obj->attrib->hb_spinlock lock of
sub-objects found in the hash traversal.  These locks are in a different
realm than the one used for the irias_objects hash table itself.

So put the latter into it's own lockdep class.

Reported-by: Dave Jones <davej@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
---
 net/irda/iriap.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

Comments

Dave Jones June 7, 2011, 12:13 a.m. UTC | #1
On Mon, Jun 06, 2011 at 05:00:56PM -0700, David Miller wrote:
 > From: Dave Jones <davej@redhat.com>
 > Date: Wed, 20 Apr 2011 23:40:58 -0400
 > 
 > > My reading of that comment suggests that the two locks aren't the same,
 > > so is this just missing a lockdep annotation ?
 > 
 > Dave, I'm going to check in the following to net-2.6 to try and
 > address this.  Let me know how it works for you.
 
will check it out once I'm done bisecting a different bug, thanks.

	Dave

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/net/irda/iriap.c b/net/irda/iriap.c
index 3647753..f876eed 100644
--- a/net/irda/iriap.c
+++ b/net/irda/iriap.c
@@ -87,6 +87,8 @@  static inline void iriap_start_watchdog_timer(struct iriap_cb *self,
 			 iriap_watchdog_timer_expired);
 }
 
+static struct lock_class_key irias_objects_key;
+
 /*
  * Function iriap_init (void)
  *
@@ -114,6 +116,9 @@  int __init iriap_init(void)
 		return -ENOMEM;
 	}
 
+	lockdep_set_class_and_name(&irias_objects->hb_spinlock, &irias_objects_key,
+				   "irias_objects");
+
 	/*
 	 *  Register some default services for IrLMP
 	 */