Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

acpi: bus: check once more for an empty list after locking it

List could have become empty after the unlocked check that was made earlier,
so check again inside the lock.

Should fix https://bugzilla.redhat.com/show_bug.cgi?id=427765

Signed-off-by: Chuck Ebbert <cebbert@redhat.com>
Cc: <stable@kernel.org>
Cc: Len Brown <lenb@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Chuck Ebbert and committed by
Linus Torvalds
f0a37e00 d1e77806

+4 -3
+4 -3
drivers/acpi/bus.c
··· 373 373 } 374 374 375 375 spin_lock_irqsave(&acpi_bus_event_lock, flags); 376 - entry = 377 - list_entry(acpi_bus_event_list.next, struct acpi_bus_event, node); 378 - if (entry) 376 + if (!list_empty(&acpi_bus_event_list)) { 377 + entry = list_entry(acpi_bus_event_list.next, 378 + struct acpi_bus_event, node); 379 379 list_del(&entry->node); 380 + } 380 381 spin_unlock_irqrestore(&acpi_bus_event_lock, flags); 381 382 382 383 if (!entry)