ACPICA: Fix a race in GenericSerialBus (I2C) and GPIO handling
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 7 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | ACPICA: Fix race in GenericSerialBus (I2C) and GPIO OpRegion parameter handlingdrivers/ drivers/ drivers/ +1 more | +52 | 2 replies | |
| 2/2 | ACPICA: Remove some code duplication from acpi_ev_address_space_dispatchdrivers/ | +5 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/2] ACPICA: Fix a race in GenericSerialBus (I2C) and GPIO handling
Hi All,
On one of my machines I noticed the following errors being logged:
[ 52.892807] i2c i2c-0: adapter quirk: no zero length (addr 0x0078, size 0, read) [ 52.893037] i2c i2c-0: i2c read 0 bytes from client@0x78 starting at reg 0x0 failed, error: -95
The second line is coming from the Linux I2C ACPI OpRegion handling and after a bunch of debugging I've found out that there is a rather obvious (once you see it) and nasty race condition in the handling of I2C and GPIO opregions in acpi_ev_address_space_dispatch(). See the first patch in this series (the second patch is a follow-up cleanup patch removing some code duplication).
TBH I'm surprised that this issue has gone unnoticed as long as it has, but I guess that it mostly leads to unreproducable sporadic problems making it hard to debug and I got lucky that I had a machine where the race seems to trigger about once every 20 seconds.
I know that ACPICA patches are normally merged through the ACPICA upstream but given that this is a serious bug, I believe that in this case it might be best to add the fix directly to Linux and then port it to ACPICA from there.
Regards,
Hans