From 0e828e8c2bab6d30649447eea68686413c92d340 Mon Sep 17 00:00:00 2001 From: Fernando Guzman Lugo Date: Fri, 12 Feb 2010 19:07:14 -0600 Subject: [PATCH] Mailbox: flush pending deferred works before freeing blk queue flush pending deferred works before freeing blk_queue to prevent any attempt of access to blk_queue after it was freed Signed-off-by: Fernando Guzman Lugo Signed-off-by: Hiroshi DOYU --- arch/arm/plat-omap/mailbox.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/plat-omap/mailbox.c b/arch/arm/plat-omap/mailbox.c index 252a58698ef7..77c23f5a0037 100644 --- a/arch/arm/plat-omap/mailbox.c +++ b/arch/arm/plat-omap/mailbox.c @@ -299,6 +299,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); -- 2.34.1