Re: [PATCH v3 06/10] ACPI: extlog: Defer CXL protocol error handling to avoid lock inversion
Alison Schofield <[email protected]>
| Newsgroups | org.kernel.vger.linux-cxl,org.kernel.vger.linux-acpi |
|---|---|
| Message-ID | <[email protected]> |
On Fri, Jul 17, 2026 at 09:16:43AM -0700, Dave Jiang wrote: > sashiko-bot flagged an AB-BA deadlock between the PCI device_lock and > the MCE decoder chain rwsem. > > extlog_print() calls cxl_cper_handle_prot_err() synchronously while the > MCE notifier chain rwsem is held, and that path takes the PCI device_lock > via guard(device)(). The probe path takes the locks in the opposite > order (device_lock held while mce_register_decode_chain() takes the > rwsem), so the two form an AB-BA deadlock. > > ghes.c already avoids this by posting protocol errors to a kfifo and > handling them from a workqueue via cxl_cper_post_prot_err(). Export that > function and use it from acpi_extlog.c instead of calling > cxl_cper_handle_prot_err() directly. > > Reported-by: [email protected] > Link: https://lore.kernel.org/linux-cxl/[email protected]/ > Assisted-by: Claude:claude-sonnet-4-6 > Signed-off-by: Dave Jiang <[email protected]> Reviewed-by: Alison Schofield <[email protected]>