From: David Miller <davem@davemloft.net>
To: davej@redhat.com
Cc: netdev@vger.kernel.org, samuel@sortiz.org
Subject: Re: suspect locking in net/irda/iriap.c
Date: Mon, 06 Jun 2011 17:00:56 -0700 (PDT) [thread overview]
Message-ID: <20110606.170056.193694265.davem@davemloft.net> (raw)
In-Reply-To: <20110421034057.GA10536@redhat.com>
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(-)
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
*/
--
1.7.5.2
next prev parent reply other threads:[~2011-06-07 0:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-21 3:40 suspect locking in net/irda/iriap.c Dave Jones
2011-06-07 0:00 ` David Miller [this message]
2011-06-07 0:13 ` Dave Jones
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110606.170056.193694265.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=davej@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=samuel@sortiz.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).