Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 7 Feb 2020 22:21:45 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r357668 - head/sys/compat/linux
Message-ID:  <202002072221.017MLjX5023235@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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@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);
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202002072221.017MLjX5023235>