Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F148998812
D55994.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D55994.diff
View Options
diff --git a/sys/x86/acpica/acpi_apm.c b/sys/x86/acpica/acpi_apm.c
--- a/sys/x86/acpica/acpi_apm.c
+++ b/sys/x86/acpica/acpi_apm.c
@@ -243,9 +243,9 @@
/* Remove this clone's data from the list and free it. */
ACPI_LOCK(acpi);
STAILQ_REMOVE(&acpi_sc->apm_cdevs, clone, apm_clone_data, entries);
+ ACPI_UNLOCK(acpi);
seldrain(&clone->sel_read);
knlist_destroy(&clone->sel_read.si_note);
- ACPI_UNLOCK(acpi);
free(clone, M_APMDEV);
}
@@ -408,11 +408,9 @@
struct apm_clone_data *clone;
devfs_get_cdevpriv((void **)&clone);
- ACPI_LOCK(acpi);
kn->kn_hook = clone;
kn->kn_fop = &apm_readfiltops;
knlist_add(&clone->sel_read.si_note, kn, 0);
- ACPI_UNLOCK(acpi);
return (0);
}
@@ -421,10 +419,8 @@
{
struct apm_clone_data *clone;
- ACPI_LOCK(acpi);
clone = kn->kn_hook;
knlist_remove(&clone->sel_read.si_note, kn, 0);
- ACPI_UNLOCK(acpi);
}
static int
@@ -433,8 +429,8 @@
struct apm_clone_data *clone;
int sleeping;
- ACPI_LOCK(acpi);
clone = kn->kn_hook;
+ ACPI_LOCK(acpi);
sleeping = clone->acpi_sc->acpi_next_stype != POWER_STYPE_AWAKE;
ACPI_UNLOCK(acpi);
return (sleeping);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Mar 22, 4:08 PM (13 h, 26 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30082217
Default Alt Text
D55994.diff (1 KB)
Attached To
Mode
D55994: acpi_apm: Narrow scope of ACPI_LOCK
Attached
Detach File
Event Timeline
Log In to Comment