Author: kib
Date: Fri Feb  7 22:21:44 2020
New Revision: 357668
URL: https://svnweb.freebsd.org/changeset/base/357668

Log:
  linux futex_put(): do not touch futex after dropping our reference.
  
  Reported and tested by:       Steve Roome <m...@stephenroome.com>
  Sponsored by: The FreeBSD Foundation
  MFC after:    1 week

Modified:
  head/sys/compat/linux/linux_futex.c

Modified: head/sys/compat/linux/linux_futex.c
==============================================================================
--- head/sys/compat/linux/linux_futex.c Fri Feb  7 21:57:27 2020        
(r357667)
+++ head/sys/compat/linux/linux_futex.c Fri Feb  7 22:21:44 2020        
(r357668)
@@ -329,9 +329,9 @@ futex_put(struct futex *f, struct waiting_proc *wp)
            f->f_key.shared);
        LINUX_CTR3(sys_futex, "futex_put uaddr %p ref %d shared %d",
            f->f_uaddr, f->f_refcount, f->f_key.shared);
-       FUTEXES_UNLOCK;
        if (FUTEX_LOCKED(f))
                futex_unlock(f);
+       FUTEXES_UNLOCK;
 
        LIN_SDT_PROBE0(futex, futex_put, return);
 }
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to