i2c: bcm-iproc: Fix bcm_iproc_i2c_isr deadlock issue
stable inclusion from stable-v5.10.192 commit 268cc9bc54bd98979293b10f3f1ff13515809c08 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I933RF Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=268cc9bc54bd98979293b10f3f1ff13515809c08 -------------------------------- commit 4caf4cb1 upstream. iproc_i2c_rd_reg() and iproc_i2c_wr_reg() are called from both interrupt context (e.g. bcm_iproc_i2c_isr) and process context (e.g. bcm_iproc_i2c_suspend). Therefore, interrupts should be disabled to avoid potential deadlock. To prevent this scenario, use spin_lock_irqsave(). Fixes: 9a103872 ("i2c: iproc: add NIC I2C support") Signed-off-by:Chengfeng Ye <dg573847474@gmail.com> Acked-by:
Ray Jui <ray.jui@broadcom.com> Reviewed-by:
Andi Shyti <andi.shyti@kernel.org> Signed-off-by:
Wolfram Sang <wsa@kernel.org> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by:
sanglipeng <sanglipeng1@jd.com>
Loading
Please sign in to comment