Skip to contentSkip to conversation

Mailbox: flush pending deferred works before freeing blk q=

PATCH New Fernando Guzman Lugo 1 participant 1 message Feb 13, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Mailbox: flush pending deferred works before freeing blk q=

ueue

flush pending deferred works before freeing blk_queue to prevent any attempt of access to blk_queue after it was freed

---
 arch/arm/plat-omap/mailbox.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
arch/arm/plat-omap/mailbox.c +2 -0
index e6cc4b0..3e2f961 100644
@@ -297,6 +297,8 @@ static int omap_mbox_startup(struct omap_mbox *mbox)
 static void omap_mbox_fini(struct omap_mbox *mbox)
 {
 	free_irq(mbox->irq, mbox);
+	tasklet_kill(&mbox->txq->tasklet);
+	flush_work(&mbox->rxq->work);
 	mbox_queue_free(mbox->txq);
 	mbox_queue_free(mbox->rxq);

=20
--=20
1.6.0.4