Re: [PATCH] gpio: pca953x: Survive spurious interrupts

2020-10-07 Thread Andy Shevchenko
On Wed, Oct 7, 2020 at 6:00 PM Marc Zyngier wrote: > On 2020-10-07 15:03, Andy Shevchenko wrote: > > On Wed, Oct 7, 2020 at 4:20 PM Marc Zyngier wrote: > >> On 2020-10-07 14:10, Andy Shevchenko wrote: > >> > On Wed, Oct 7, 2020 at 3:09 PM Marc Zyngier wrote: > >> >> On 2020-10-07 13:02, Andy She

Re: [PATCH] gpio: pca953x: Survive spurious interrupts

2020-10-07 Thread Marc Zyngier
On 2020-10-07 15:03, Andy Shevchenko wrote: On Wed, Oct 7, 2020 at 4:20 PM Marc Zyngier wrote: On 2020-10-07 14:10, Andy Shevchenko wrote: > On Wed, Oct 7, 2020 at 3:09 PM Marc Zyngier wrote: >> On 2020-10-07 13:02, Andy Shevchenko wrote: >> > On Wed, Oct 7, 2020 at 12:49 PM Linus Walleij >> >

Re: [PATCH] gpio: pca953x: Survive spurious interrupts

2020-10-07 Thread Andy Shevchenko
On Wed, Oct 7, 2020 at 4:20 PM Marc Zyngier wrote: > On 2020-10-07 14:10, Andy Shevchenko wrote: > > On Wed, Oct 7, 2020 at 3:09 PM Marc Zyngier wrote: > >> On 2020-10-07 13:02, Andy Shevchenko wrote: > >> > On Wed, Oct 7, 2020 at 12:49 PM Linus Walleij > >> > wrote: > >> >> On Mon, Oct 5, 2020

Re: [PATCH] gpio: pca953x: Survive spurious interrupts

2020-10-07 Thread Marc Zyngier
On 2020-10-07 14:10, Andy Shevchenko wrote: On Wed, Oct 7, 2020 at 3:09 PM Marc Zyngier wrote: On 2020-10-07 13:02, Andy Shevchenko wrote: > On Wed, Oct 7, 2020 at 12:49 PM Linus Walleij > wrote: >> On Mon, Oct 5, 2020 at 4:02 PM Marc Zyngier wrote: >> >> > The pca953x driver never checks the

Re: [PATCH] gpio: pca953x: Survive spurious interrupts

2020-10-07 Thread Andy Shevchenko
On Wed, Oct 7, 2020 at 3:09 PM Marc Zyngier wrote: > On 2020-10-07 13:02, Andy Shevchenko wrote: > > On Wed, Oct 7, 2020 at 12:49 PM Linus Walleij > > wrote: > >> On Mon, Oct 5, 2020 at 4:02 PM Marc Zyngier wrote: > >> > >> > The pca953x driver never checks the result of irq_find_mapping(), > >>

Re: [PATCH] gpio: pca953x: Survive spurious interrupts

2020-10-07 Thread Marc Zyngier
On 2020-10-07 13:02, Andy Shevchenko wrote: On Wed, Oct 7, 2020 at 12:49 PM Linus Walleij wrote: On Mon, Oct 5, 2020 at 4:02 PM Marc Zyngier wrote: > The pca953x driver never checks the result of irq_find_mapping(), > which returns 0 when no mapping is found. When a spurious interrupt > is d

Re: [PATCH] gpio: pca953x: Survive spurious interrupts

2020-10-07 Thread Andy Shevchenko
On Wed, Oct 7, 2020 at 12:49 PM Linus Walleij wrote: > > On Mon, Oct 5, 2020 at 4:02 PM Marc Zyngier wrote: > > > The pca953x driver never checks the result of irq_find_mapping(), > > which returns 0 when no mapping is found. When a spurious interrupt > > is delivered (which can happen under obsc

Re: [PATCH] gpio: pca953x: Survive spurious interrupts

2020-10-07 Thread Linus Walleij
On Mon, Oct 5, 2020 at 4:02 PM Marc Zyngier wrote: > The pca953x driver never checks the result of irq_find_mapping(), > which returns 0 when no mapping is found. When a spurious interrupt > is delivered (which can happen under obscure circumstances), the > kernel explodes as it still tries to ha

[PATCH] gpio: pca953x: Survive spurious interrupts

2020-10-05 Thread Marc Zyngier
The pca953x driver never checks the result of irq_find_mapping(), which returns 0 when no mapping is found. When a spurious interrupt is delivered (which can happen under obscure circumstances), the kernel explodes as it still tries to handle the error code as a real interrupt. Handle this particu