From be5d954ad64fb531f677fc08fd101308d4bb15ea Mon Sep 17 00:00:00 2001 From: Sree Sesha Aravind Vadrevu Date: Tue, 13 Aug 2013 15:18:05 -0700 Subject: msm: mdss: Avoid deadlock in interrupt handler Reduce the locking scope in irq_dispatch so that mdss_lock is not held when the irq_handler is dispatched. The dispatched irq_handler will try to acquire mdp_lock but another active process can already have mdp_lock and tries to procure mdss_lock creating a deadlock situation. Not locking with mdss_lock is acceptable as the calls will be synchronized through mdp_lock from MDP clients. Change-Id: I586b7e00c046dd4081b4e838e62e0a0556f4c717 Signed-off-by: Sree Sesha Aravind Vadrevu --- drivers/video/fbdev/msm/mdss_mdp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/video/fbdev/msm/mdss_mdp.c b/drivers/video/fbdev/msm/mdss_mdp.c index 3487c5d6e526..3444db67b3e4 100644 --- a/drivers/video/fbdev/msm/mdss_mdp.c +++ b/drivers/video/fbdev/msm/mdss_mdp.c @@ -179,9 +179,10 @@ static inline int mdss_irq_dispatch(u32 hw_ndx, int irq, void *ptr) spin_lock(&mdss_lock); hw = mdss_irq_handlers[hw_ndx]; + spin_unlock(&mdss_lock); + if (hw) rc = hw->irq_handler(irq, hw->ptr); - spin_unlock(&mdss_lock); return rc; } -- cgit v1.2.3