Re: [PATCH] i2c-eg20t: fix race between i2c init and interrupt enable

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

 



On 2016年09月22日 00:16, Wolfram Sang wrote:
On Sun, Sep 18, 2016 at 06:52:31PM +0800, Yadi Hu wrote:
From: "Yadi.hu" <yadi.hu@xxxxxxxxxxxxx>

the eg20t driver call request_irq() function before the pch_base_address,
base address of i2c controller's register, is assigned an effective value.

there is one possible scenario that an interrupt which isn't inside eg20t
arrives immediately after request_irq() is executed when i2c controller
shares an interrupt number with others. since the interrupt handler
pch_i2c_handler() has already active as shared action, it will be called
and read its own register to determine if this interrupt is from itself.

At that moment, since base address of i2c registers is not remapped
in kernel space yet,so the INT handler will access an illegal address
and then a error occurs.

Signed-off-by: Yadi.hu <yadi.hu@xxxxxxxxxxxxx>
Applied to for-next, thanks!

Please make sure "V3" also appears in the patch subject since patch
management tools pick this up. "-v <nr>" in recent git versions makes
this super easy.

Got it, I will resend the patch with V3 tag.


Yadi

--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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