Re: 4.4.1 regression from 4.1.x: Soekris net5501 crash in IRQ after mfgpt timer initialization
From: Nix
Date: Tue Feb 02 2016 - 10:04:09 EST
On 2 Feb 2016, Thomas Gleixner said:
> On Tue, 2 Feb 2016, Nix wrote:
>
>> [Cc:ed Thomas on the vague hope that maybe this is osmething to do with
>> the IRQ subsystem in general, though I doubt it, since only the one
>> machine is crashing for me: it's probably the CS5531's interactions
>> with said subsystem at fault.]
>
> Kinda. That driver does the following:
>
> setup the irq in CS5531
>
> request the interrupt to install the handler
>
> register the clockevents device
It seems like it should do those in the opposite order, really, or at
the very least do the IRQ setup last!
> So the interrupt hits before the clockevent device is registered and the event
> handler is installed. So mfgpt_tick() will happily call a null pointer.
>
> The patch below should fix^Wwork around the issue.
The fairly trivial code motion below also seems to work, and may be more
like an actual fix, though I'm a bit horrified that it's this simple. I
may well have moved too much and unknowingly violated some invariant.
(Note: the actual code motion was of course to move the IRQ registration
down, but git chose to depict it as the opposite, somewhat unclearly.)
Done under my work address because all this firewall rebooting is
stopping me from getting work done: