acpi_apm: Don't recurse on ACPI_LOCK in apmreadfilt
The lock is already held by the caller since it is used as the knlist
lock.
PR: 293901
Reported by: Jiaming Zhang <r772577952@gmail.com>
Fixes: cc2715cf1f ("acpi_apm: Narrow scope of ACPI_LOCK")
This commit is contained in:
@@ -430,9 +430,7 @@ apmreadfilt(struct knote *kn, long hint)
|
||||
int sleeping;
|
||||
|
||||
clone = kn->kn_hook;
|
||||
ACPI_LOCK(acpi);
|
||||
sleeping = clone->acpi_sc->acpi_next_stype != POWER_STYPE_AWAKE;
|
||||
ACPI_UNLOCK(acpi);
|
||||
return (sleeping);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user