summaryrefslogtreecommitdiffstats
path: root/net/irda
diff options
context:
space:
mode:
authorSamuel Ortiz <samuel@sortiz.org>2007-03-16 20:38:23 -0700
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-25 22:26:23 -0700
commitc7630a4b932af254d61947a3a7e3831de92c7fb5 (patch)
tree3cec791f128972409a30c4b698c3400937afc0f4 /net/irda
parent5c81cd75fa63eaf2df0b8904508e53e953f316cf (diff)
downloadlinux-c7630a4b932af254d61947a3a7e3831de92c7fb5.tar.bz2
[IrDA]: irda lockdep annotation
Rmmoding irda triggers a lockdep false positive. Reported-by: Dave Jones <davej@redhat.com> Signed-off-by: Samuel Ortiz <samuel@sortiz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/irda')
-rw-r--r--net/irda/irqueue.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/net/irda/irqueue.c b/net/irda/irqueue.c
index 92662330dbcf..d058b467f9e4 100644
--- a/net/irda/irqueue.c
+++ b/net/irda/irqueue.c
@@ -384,6 +384,9 @@ EXPORT_SYMBOL(hashbin_new);
* for deallocating this structure if it's complex. If not the user can
* just supply kfree, which should take care of the job.
*/
+#ifdef CONFIG_LOCKDEP
+static int hashbin_lock_depth = 0;
+#endif
int hashbin_delete( hashbin_t* hashbin, FREE_FUNC free_func)
{
irda_queue_t* queue;
@@ -395,7 +398,8 @@ int hashbin_delete( hashbin_t* hashbin, FREE_FUNC free_func)
/* Synchronize */
if ( hashbin->hb_type & HB_LOCK ) {
- spin_lock_irqsave(&hashbin->hb_spinlock, flags);
+ spin_lock_irqsave_nested(&hashbin->hb_spinlock, flags,
+ hashbin_lock_depth++);
}
/*
@@ -419,6 +423,9 @@ int hashbin_delete( hashbin_t* hashbin, FREE_FUNC free_func)
/* Release lock */
if ( hashbin->hb_type & HB_LOCK) {
spin_unlock_irqrestore(&hashbin->hb_spinlock, flags);
+#ifdef CONFIG_LOCKDEP
+ hashbin_lock_depth--;
+#endif
}
/*