Date: Thu, 16 Mar 2017 08:00:03 +0000 (UTC) From: Mateusz Guzik <mjg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r315393 - stable/11/sys/kern Message-ID: <201703160800.v2G803qc016686@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mjg Date: Thu Mar 16 08:00:02 2017 New Revision: 315393 URL: https://svnweb.freebsd.org/changeset/base/315393 Log: MFC r313472: The runlock slow path would update wrong variable before restarting the loop, in effect corrupting the state. Something was botched in the previous mfc attempt in r315380. Modified: stable/11/sys/kern/kern_rwlock.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/kern_rwlock.c ============================================================================== --- stable/11/sys/kern/kern_rwlock.c Thu Mar 16 07:51:34 2017 (r315392) +++ stable/11/sys/kern/kern_rwlock.c Thu Mar 16 08:00:02 2017 (r315393) @@ -749,7 +749,7 @@ __rw_runlock_hard(volatile uintptr_t *c, if (!atomic_cmpset_rel_ptr(&rw->rw_lock, RW_READERS_LOCK(1) | v, x)) { turnstile_chain_unlock(&rw->lock_object); - x = RW_READ_VALUE(rw); + v = RW_READ_VALUE(rw); continue; } if (LOCK_LOG_TEST(&rw->lock_object, 0))
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201703160800.v2G803qc016686>