ACPI / APEI: Pass ghes and estatus separately to avoid a later copy
authorJames Morse <james.morse@arm.com>
Tue, 29 Jan 2019 18:48:53 +0000 (18:48 +0000)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 7 Feb 2019 22:10:45 +0000 (23:10 +0100)
commitf2a7e059aa7a6a22a6f4612f31ee29e726a3bfd0
treef37bc1ba0e2d417139c4e1040382c2a0b620a94d
parentb484079b9f520cc9a0797d885f1cd7f64b72b1b2
ACPI / APEI: Pass ghes and estatus separately to avoid a later copy

The NMI-like notifications scribble over ghes->estatus, before
copying it somewhere else. If this interrupts the ghes_probe() code
calling ghes_proc() on each struct ghes, the data is corrupted.

All the NMI-like notifications should use a queued estatus entry
from the beginning, instead of the ghes version, then copying it.
To do this, break up any use of "ghes->estatus" so that all
functions take the estatus as an argument.

This patch just moves these ghes->estatus dereferences into separate
arguments, no change in behaviour. struct ghes becomes unused in
ghes_clear_estatus() as it only wanted ghes->estatus, which we now
pass directly. This is removed.

Signed-off-by: James Morse <james.morse@arm.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/apei/ghes.c