Skip to content

Commit 12b25d2

Browse files
James Morsegregkh
authored andcommitted
ACPI / APEI: Add missing synchronize_rcu() on NOTIFY_SCI removal
commit 7d64f82cceb21e6d95db312d284f5f195e120154 upstream. When removing a GHES device notified by SCI, list_del_rcu() is used, ghes_remove() should call synchronize_rcu() before it goes on to call kfree(ghes), otherwise concurrent RCU readers may still hold this list entry after it has been freed. Signed-off-by: James Morse <james.morse@arm.com> Reviewed-by: "Huang, Ying" <ying.huang@intel.com> Fixes: 81e88fd (ACPI, APEI, Generic Hardware Error Source POLL/IRQ/NMI notification type support) Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent b526de0 commit 12b25d2

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

drivers/acpi/apei/ghes.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1067,6 +1067,7 @@ static int ghes_remove(struct platform_device *ghes_dev)
10671067
if (list_empty(&ghes_sci))
10681068
unregister_acpi_hed_notifier(&ghes_notifier_sci);
10691069
mutex_unlock(&ghes_list_mutex);
1070+
synchronize_rcu();
10701071
break;
10711072
case ACPI_HEST_NOTIFY_NMI:
10721073
ghes_nmi_remove(ghes);

0 commit comments

Comments
 (0)