Author: mjg
Date: Fri Jul 24 17:28:24 2020
New Revision: 363480
URL: https://svnweb.freebsd.org/changeset/base/363480

Log:
  lockmgr: add missing 'continue' to account for spuriously failed fcmpset
  
  PR:           248245
  Reported by:  gbe
  Noted by:     markj
  Fixes by:     r363415 ("lockmgr: add adaptive spinning")

Modified:
  head/sys/kern/kern_lock.c

Modified: head/sys/kern/kern_lock.c
==============================================================================
--- head/sys/kern/kern_lock.c   Fri Jul 24 17:11:14 2020        (r363479)
+++ head/sys/kern/kern_lock.c   Fri Jul 24 17:28:24 2020        (r363480)
@@ -836,6 +836,7 @@ lockmgr_xlock_hard(struct lock *lk, u_int flags, struc
                if (x == LK_UNLOCKED) {
                        if (atomic_fcmpset_acq_ptr(&lk->lk_lock, &x, tid))
                                break;
+                       continue;
                }
                if ((flags & (LK_ADAPTIVE | LK_INTERLOCK)) == LK_ADAPTIVE) {
                        if (lockmgr_xlock_adaptive(&lda, lk, &x))
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to