Re: [PATCH] i2c: designware: Fix oops from i2c_dw_irq_handler_slave

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Aug 11, 2017 at 02:44:55PM +0300, Jarkko Nikula wrote:
> When i2c-designware is initialized in slave mode the
> i2c-designware-slave.c: i2c_dw_irq_handler_slave() can hit a NULL
> pointer dereference when I2C slave backend is not registered but code is
> accessing the struct dw_i2c_dev.slave without testing is it NULL.
> 
> We might get spurious interrupts from other devices or from IRQ core
> during unloading the driver when CONFIG_DEBUG_SHIRQ is set. Existing
> check for enable and IRQ status is not enough since device can be power
> gated and those bits may read 1.
> 
> Fix this by handling the interrupt only when also struct dw_i2c_dev.slave
> is set.
> 
> Signed-off-by: Jarkko Nikula <jarkko.nikula@xxxxxxxxxxxxxxx>

Applied to for-current, thanks!

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux