In the conversion to atomic_t, six_lock_slowpath() ended up calling
six_lock_wakeup() in the failure path with a state variable that was
never initialized - whoops.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
six_lock_should_sleep_fn should_sleep_fn, void *p,
unsigned long ip)
{
- u32 old;
int ret = 0;
if (type == SIX_LOCK_write) {
out:
if (ret && type == SIX_LOCK_write) {
six_clear_bitmask(lock, SIX_LOCK_HELD_write);
- six_lock_wakeup(lock, old, SIX_LOCK_read);
+ six_lock_wakeup(lock, atomic_read(&lock->state), SIX_LOCK_read);
}
return ret;