Skip to content
Commit f37e0c6e authored by Andy Ross's avatar Andy Ross Committed by Anas Nashif
Browse files

kernel/spinlock: Fix race in spinlock validation



The k_spin_lock() validation was setting the new owner of the spinlock
BEFORE the actual lock was taken, so it could race against other
processors trying the same thing.  Split the modification step out
into a separate function that can be called after we affirmatively
have the lock.

Signed-off-by: default avatarAndy Ross <andrew.j.ross@intel.com>
parent 5697dd79
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment