summaryrefslogtreecommitdiffstats
path: root/net/irda/irttp.c
diff options
context:
space:
mode:
authorDeepak Saxena <dsaxena@mvista.com>2009-07-27 10:49:44 -0700
committerDavid S. Miller <davem@davemloft.net>2009-07-27 10:49:44 -0700
commit0cbb0a781a42f131e9c6836554f402cb85f8f38b (patch)
tree026518c552a42bafb33c8657de28753b666a9175 /net/irda/irttp.c
parent8bae1b2b13beb4cf4c0f119f97640503c2b74b0f (diff)
downloadop-kernel-dev-0cbb0a781a42f131e9c6836554f402cb85f8f38b.zip
op-kernel-dev-0cbb0a781a42f131e9c6836554f402cb85f8f38b.tar.gz
net: irda: init spinlock after memcpy
irttp_dup() copies a tsap_cb struct, but does not initialize the spinlock in the new structure, which confuses lockdep. Signed-off-by: Deepak Saxena <dsaxena@mvista.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/irda/irttp.c')
-rw-r--r--net/irda/irttp.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/irda/irttp.c b/net/irda/irttp.c
index ecf4eb2..9cb79f9 100644
--- a/net/irda/irttp.c
+++ b/net/irda/irttp.c
@@ -1453,6 +1453,7 @@ struct tsap_cb *irttp_dup(struct tsap_cb *orig, void *instance)
}
/* Dup */
memcpy(new, orig, sizeof(struct tsap_cb));
+ spin_lock_init(&new->lock);
/* We don't need the old instance any more */
spin_unlock_irqrestore(&irttp->tsaps->hb_spinlock, flags);
OpenPOWER on IntegriCloud