summaryrefslogtreecommitdiff
path: root/kernel/locking
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2018-06-28 02:34:28 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2018-06-28 02:34:27 -0700
commit14efecefa760800fa4d6974054b52e3e7ca91d3f (patch)
treee1d877bcca0ed1ab28fc6f6f897fafb964953545 /kernel/locking
parent66c519deb658ad6c8395d681bc6123a8098a7752 (diff)
parentf9cff13b5d3e04e897a495168da90933b503a6cc (diff)
Merge "Merge android-4.4.135 (c9d74f2) into msm-4.4"
Diffstat (limited to 'kernel/locking')
-rw-r--r--kernel/locking/qspinlock.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/kernel/locking/qspinlock.c b/kernel/locking/qspinlock.c
index 8173bc7fec92..3b40c8809e52 100644
--- a/kernel/locking/qspinlock.c
+++ b/kernel/locking/qspinlock.c
@@ -423,6 +423,14 @@ queue:
tail = encode_tail(smp_processor_id(), idx);
node += idx;
+
+ /*
+ * Ensure that we increment the head node->count before initialising
+ * the actual node. If the compiler is kind enough to reorder these
+ * stores, then an IRQ could overwrite our assignments.
+ */
+ barrier();
+
node->locked = 0;
node->next = NULL;
pv_init_node(node);