lkml.org 
[lkml]   [2017]   [May]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] genirq: Check irq disabled & masked states in irq_shutdown
On Sat, 27 May 2017, jeffy wrote:
> On 05/26/2017 09:20 PM, Thomas Gleixner wrote:
> > On Fri, 26 May 2017, Jeffy Chen wrote:
> >
> > > If irq is already disabled and masked, we would hit a unbalanced irq
> > > shutdown/disable/mask when freeing it.
> >
> > Errr? What exactly is unbalanced? None of the called functions has any
> > counter or whatever.
> >
> > Can you please explain what you are trying to fix?
>
> sorry, i'll try to rewrite the commit message.
>
> for example when a driver(drivers/net/wireless/marvell/mwifiex/main.c) try to
> do these:
>
> devm_request_irq->irq_startup->irq_enable
> disable_irq <-- disabled and masked
> devm_free_irq->irq_shutdown <-- disable it again

This driver is broken as hell. It requests the interrupt _BEFORE_ the whole
thing is initialized. If there is a pending interrupt on that line, it will
explode nicely before it is able to disable the irq. But that's a different
problem.

Thanks,

tglx

\
 
 \ /
  Last update: 2017-05-27 10:17    [W:0.065 / U:0.644 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site