Hi Hans, On Di, 2019-11-19 at 11:51 +0100, Hans Verkuil wrote: > The irq_find_mapping() function can return 0 when called in the > rmi_process_interrupt_requests() function. > > This causes a kernel crash. Check for a 0 value and skip calling > handle_nested_irq() in that case. > > This was tested with the F54 function enabled on a Lenovo X1 Carbon. > > Signed-off-by: Hans Verkuil <hverkuil-cisco@xxxxxxxxx> > Fixes: 24d28e4f1271 ("Input: synaptics-rmi4 - convert irq distribution to irq_domain") This is already fixed upstream by 549766ac2ac1 "Input: synaptics-rmi4 - clear IRQ enables for F54" Regards, Lucas > --- > drivers/input/rmi4/rmi_driver.c | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > > diff --git a/drivers/input/rmi4/rmi_driver.c b/drivers/input/rmi4/rmi_driver.c > index 772493b1f665..6085ec424a84 100644 > --- a/drivers/input/rmi4/rmi_driver.c > +++ b/drivers/input/rmi4/rmi_driver.c > @@ -154,8 +154,12 @@ static int rmi_process_interrupt_requests(struct rmi_device *rmi_dev) > */ > mutex_unlock(&data->irq_mutex); > > - for_each_set_bit(i, data->irq_status, data->irq_count) > - handle_nested_irq(irq_find_mapping(data->irqdomain, i)); > + for_each_set_bit(i, data->irq_status, data->irq_count) { > + unsigned int irq = irq_find_mapping(data->irqdomain, i); > + > + if (irq) > + handle_nested_irq(irq); > + } > > if (data->input) > input_sync(data->input);