Message ID | 1625062303-15327-1-git-send-email-alain.volmat@foss.st.com |
---|---|
Headers | show |
Series | i2c: stm32f7: several fixes in error cases | expand |
Hi, please put this on hold for the moment as I might have found an issue with one patch. Sorry for the noise. Regards, Alain On Wed, Jun 30, 2021 at 04:11:40PM +0200, Alain Volmat wrote: > This serie provides several fixes needed for cases when communication > when a device is not behaving properly. > > Alain Volmat (3): > i2c: stm32f7: recover the bus on access timeout > i2c: stm32f7: flush TX FIFO upon transfer errors > i2c: stm32f7: prevent calling slave handling if no slave running > > drivers/i2c/busses/i2c-stm32f7.c | 31 +++++++++++++++++++++++++++---- > 1 file changed, 27 insertions(+), 4 deletions(-) > > -- > 2.25.1 >
On Wed, Jun 30, 2021 at 04:11:43PM +0200, Alain Volmat wrote: > Slave interrupt handler should only be called if there is actually > a slave registered and running to avoid accessing an invalid pointer. > > Without this commit, an OOPS can be generated due to a NULL ptr dereference > while receiving an IT when there is no master transfer and no slave > running: > - stm32f7_i2c_isr_event > - no master_mode hence calling stm32f7_i2c_slave_isr_event > - access to i2c_dev->slave_running leading to oops due to > slave_running being NULL. > > Fixes: 60d609f30de2 ("i2c: i2c-stm32f7: Add slave support") > > Signed-off-by: Alain Volmat <alain.volmat@foss.st.com> Is this one still of interest? You resent patches 1 and 2 but not this one?
Hi Wolfram, On Mon, Nov 29, 2021 at 01:21:05PM +0100, Wolfram Sang wrote: > On Wed, Jun 30, 2021 at 04:11:43PM +0200, Alain Volmat wrote: > > Slave interrupt handler should only be called if there is actually > > a slave registered and running to avoid accessing an invalid pointer. > > > > Without this commit, an OOPS can be generated due to a NULL ptr dereference > > while receiving an IT when there is no master transfer and no slave > > running: > > - stm32f7_i2c_isr_event > > - no master_mode hence calling stm32f7_i2c_slave_isr_event > > - access to i2c_dev->slave_running leading to oops due to > > slave_running being NULL. > > > > Fixes: 60d609f30de2 ("i2c: i2c-stm32f7: Add slave support") > > > > Signed-off-by: Alain Volmat <alain.volmat@foss.st.com> > > Is this one still of interest? You resent patches 1 and 2 but not this > one? No you can ignore it. Thanks.