Re: [PATCH v4 04/13] ACPI: extlog: Defer CXL protocol error handling to avoid lock inversion
Jonathan Cameron <[email protected]>
| Newsgroups | org.kernel.vger.linux-acpi,org.kernel.vger.linux-cxl |
|---|---|
| Message-ID | <20260824232954.5600083d@jic23-huawei> |
On Mon, 24 Aug 2026 10:49:27 -0700 Dave Jiang <[email protected]> wrote: > 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 two in the opposite order, > holding device_lock while mce_register_decode_chain() takes the rwsem, so > they can deadlock AB-BA. > > 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 call it instead. > > Declare it with the other CONFIG_ACPI_APEI_GHES exports rather than at the > end of the header. No #else stub: ACPI_EXTLOG selects ACPI_APEI_GHES, so > the only caller cannot exist without it. > > Reported-by: [email protected] > Closes: https://lore.kernel.org/linux-cxl/[email protected]/ > Reviewed-by: Alison Schofield <[email protected]> > Reviewed-by: Shuai Xue <[email protected]> > Assisted-by: Claude:claude-sonnet-4-6 > Signed-off-by: Dave Jiang <[email protected]> Makes sense to standardize irrespective of all the other reasons! Reviewed-by: Jonathan Cameron <[email protected]>