net: irda: init spinlock after memcpy
Subsystems (2)
PATCH 1/1 net: irda: init spinlock after memcpy
From: Deepak Saxena <[email protected]>
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 <[email protected]>
Signed-off-by Ingo Molnar <[email protected]>
Signed-off-by Thomas Gleixner <[email protected]>
---
net/irda/irttp.c +1 -0
@@ -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);
From: Thomas Gleixner <[email protected]>
Date: Mon, 27 Jul 2009 14:12:24 +0200 (CEST)
Quoted 8 lines
From: Deepak Saxena <[email protected]>
irttp_dup()copies atsap_cbstruct, but does not initialize the spinlock in the new structure, which confuses lockdep.Signed-off-by Deepak Saxena <[email protected]>Signed-off-by Ingo Molnar <[email protected]>Signed-off-by Thomas Gleixner <[email protected]>
Applied.