svn commit: r357668 - head/sys/compat/linux

Konstantin Belousov kib at FreeBSD.org
Fri Feb 7 22:21:45 UTC 2020


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 <me at 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);
 }


More information about the svn-src-all mailing list