Input: synaptics-rmi4 - prevent oopses when irq arrives while the device is not bound
Subsystems (2)
PATCH 4/26 Input: synaptics-rmi4 - prevent oopses when irq arrives while the device is not bound
From: Benjamin Tissoires <[email protected]>
If the device has been registered but is not populated, we should not process any incoming interrupt.
Make sure the pointers we are following are valid.
--- drivers/input/rmi4/rmi_driver.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/input/rmi4/rmi_driver.c +3 -0
@@ -279,6 +279,9 @@ int rmi_process_interrupt_requests(struct rmi_device *rmi_dev)struct rmi_function *entry;int error; +if (!data || !data->f01_container || !data->irq_status) +return 0 ; + error =rmi_read_block (rmi_dev, data->f01_container->fd.data_base_addr +1 , data->irq_status, data->num_of_irq_regs);
Signature · 1 line
2.1.4
Quoted 8 lines · Andrew Duggan
From: Benjamin Tissoires <[email protected]>
If the device has been registered but is not populated, we should not process any incoming interrupt.
Make sure the pointers we are following are valid.Signed-off-by Benjamin Tissoires <[email protected]>Tested-by Andrew Duggan <[email protected]>
This should just be squashed into the offending commit.
Yours,
Linus Walleij
Dmitry Torokhov
maintainerQuoted 5 lines · Andrew Duggan
From: Benjamin Tissoires <[email protected]>
If the device has been registered but is not populated, we should not process any incoming interrupt.
Make sure the pointers we are following are valid.
Why are the interrupts enabled when device is not ready?
Quoted 24 lines
Signed-off-by Benjamin Tissoires <[email protected]>Tested-by Andrew Duggan <[email protected]>--- drivers/input/rmi4/rmi_driver.c | 3 +++ 1 file changed, 3 insertions(+)drivers/input/rmi4/rmi_driver.c +3
-0@@ -279,6 +279,9 @@ int rmi_process_interrupt_requests(struct rmi_device *rmi_dev)struct rmi_function *entry;int error; +if (!data || !data->f01_container || !data->irq_status) +return 0 ; + error =rmi_read_block (rmi_dev, data->f01_container->fd.data_base_addr +1 , data->irq_status, data->num_of_irq_regs);Signature · 1 line
2.1.4
Signature · 1 line
Dmitry
Quoted 8 lines · Dmitry Torokhov
Quoted 5 lines · Andrew Duggan
From: Benjamin Tissoires <[email protected]>
If the device has been registered but is not populated, we should not process any incoming interrupt.
Make sure the pointers we are following are valid.Why are the interrupts enabled when device is not ready?
Hmm... Yes, maybe this should have been tackled at the smbus level. Sorting this out might also help in the various suspend/resume bugs we are experiencing.
Cheers,
Benjamin
Quoted 28 lines
Quoted 23 lines
Signed-off-by Benjamin Tissoires <[email protected]>Tested-by Andrew Duggan <[email protected]>--- drivers/input/rmi4/rmi_driver.c | 3 +++ 1 file changed, 3 insertions(+)drivers/input/rmi4/rmi_driver.c +3
-1@@ -279,6 +279,9 @@ int rmi_process_interrupt_requests(struct rmi_device *rmi_dev)struct rmi_function *entry;int error; +if (!data || !data->f01_container || !data->irq_status) +return 0 ; + error =rmi_read_block (rmi_dev, data->f01_container->fd.data_base_addr +1 , data->irq_status, data->num_of_irq_regs); --Quoted 2 lines
2.1.4
--
Dmitry