[PATCH 2/2] locking/qspinlock: Ensure node->count is updated before initialising node

2018-02-13 Thread Will Deacon
When queuing on the qspinlock, the count field for the current CPU's head node is incremented. This needn't be atomic because locking in e.g. IRQ context is balanced and so an IRQ will return with node->count as it found it. However, the compiler could in theory reorder the initialisation of

[PATCH 2/2] locking/qspinlock: Ensure node->count is updated before initialising node

2018-02-13 Thread Will Deacon
When queuing on the qspinlock, the count field for the current CPU's head node is incremented. This needn't be atomic because locking in e.g. IRQ context is balanced and so an IRQ will return with node->count as it found it. However, the compiler could in theory reorder the initialisation of