summaryrefslogtreecommitdiff
path: root/drivers/acpi/sbshc.c
diff options
context:
space:
mode:
authorTahsin Erdogan <tahsin@google.com>2015-05-04 21:15:31 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-05-17 09:55:06 -0700
commit76ccf3828a8d9971c7183796914c0f610e9b904d (patch)
treeef74221f4c4ef01c9eca1627a652818a00ef1519 /drivers/acpi/sbshc.c
parentfa253b2c80b4eb25785e98541842996cbd36ef83 (diff)
x86/spinlocks: Fix regression in spinlock contention detection
commit e8a4a2696fecb398b0288c43c0e0dbb91e265bb2 upstream. A spinlock is regarded as contended when there is at least one waiter. Currently, the code that checks whether there are any waiters rely on tail value being greater than head. However, this is not true if tail reaches the max value and wraps back to zero, so arch_spin_is_contended() incorrectly returns 0 (not contended) when tail is smaller than head. The original code (before regression) handled this case by casting the (tail - head) to an unsigned value. This change simply restores that behavior. Fixes: d6abfdb20223 ("x86/spinlocks/paravirt: Fix memory corruption on unlock") Signed-off-by: Tahsin Erdogan <tahsin@google.com> Cc: peterz@infradead.org Cc: Waiman.Long@hp.com Cc: borntraeger@de.ibm.com Cc: oleg@redhat.com Cc: raghavendra.kt@linux.vnet.ibm.com Link: http://lkml.kernel.org/r/1430799331-20445-1-git-send-email-tahsin@google.com Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/acpi/sbshc.c')
0 files changed, 0 insertions, 0 deletions