summaryrefslogtreecommitdiffstats
path: root/sys/arm64
diff options
context:
space:
mode:
authorwma <wma@FreeBSD.org>2016-01-28 12:00:17 +0000
committerwma <wma@FreeBSD.org>2016-01-28 12:00:17 +0000
commitd54bf9a884664360a49f9470547ec8310a002a9b (patch)
tree48188afea7f4db9b9a7991ce2136f794ee3cae18 /sys/arm64
parentdb5922dc0a22b647ac1359df508e6dba335bbde4 (diff)
downloadFreeBSD-src-d54bf9a884664360a49f9470547ec8310a002a9b.zip
FreeBSD-src-d54bf9a884664360a49f9470547ec8310a002a9b.tar.gz
Fix mutex releasing in ARM64 cpu_switch
The code should be comparing pointers, not any data gathered from a blocked_lock. Spotted by: cognet Approved by: zbb, cognet (mentor) Differential revision: https://reviews.freebsd.org/D5100
Diffstat (limited to 'sys/arm64')
-rw-r--r--sys/arm64/arm64/swtch.S5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/arm64/arm64/swtch.S b/sys/arm64/arm64/swtch.S
index bc2e521..1f20b3d 100644
--- a/sys/arm64/arm64/swtch.S
+++ b/sys/arm64/arm64/swtch.S
@@ -166,9 +166,8 @@ ENTRY(cpu_switch)
*/
str x2, [x0, #TD_LOCK]
#if defined(SCHED_ULE) && defined(SMP)
- /* Read the value in blocked_lock */
- ldr x0, =_C_LABEL(blocked_lock)
- ldr x2, [x0]
+ /* Spin if TD_LOCK points to a blocked_lock */
+ ldr x2, =_C_LABEL(blocked_lock)
1:
ldar x3, [x1, #TD_LOCK]
cmp x3, x2
OpenPOWER on IntegriCloud