IrDA: Lockdep annotation for hashbin locks
Subsystems (2)
PATCH 6/6 IrDA: Lockdep annotation for hashbin locks
Rmmoding irda triggers a lockdep false positive. We can fix that by assigning each hashbin lock to a separate class.
Reported-by Dave Jones <[email protected]>
Signed-off-by Samuel Ortiz <[email protected]>
--- include/net/irda/irqueue.h | 1 + net/irda/irqueue.c | 1 + 2 files changed, 2 insertions(+), 0 deletions(-)
include/net/irda/irqueue.h +1 -0
@@ -71,6 +71,7 @@ typedef struct hashbin_t {int hb_size;spinlock_t hb_spinlock;/* HB_LOCK - Can be used by the user */ +struct lock_class_key hb_lock_key; irda_queue_t* hb_queue[HASHBIN_SIZE] IRDA_ALIGN;irda_queue_t * hb_current;
net/irda/irqueue.c +1 -0
@@ -370,6 +370,7 @@ hashbin_t *hashbin_new(int type)/* Make sure all spinlock's are unlocked */ if ( hashbin->hb_type &HB_LOCK ) {spin_lock_init (&hashbin->hb_spinlock); +lockdep_set_class (&hashbin->hb_spinlock, &hashbin->hb_lock_key); }return hashbin;
Signature · 8 lines
1.5.0.2 ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV