• James Morse's avatar
    ACPI / APEI: Pass ghes and estatus separately to avoid a later copy · f2a7e059
    James Morse authored
    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: default avatarJames Morse <james.morse@arm.com>
    Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
    f2a7e059
ghes.c 31.8 KB