Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Jan 2020 09:16:06 +0000 (UTC)
From:      Konstantin Belousov <kib@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: r356907 - stable/11/sys/compat/linuxkpi/common/src
Message-ID:  <202001200916.00K9G6pR086490@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Mon Jan 20 09:16:06 2020
New Revision: 356907
URL: https://svnweb.freebsd.org/changeset/base/356907

Log:
  MFC r356682:
  Code must not unlock a mutex while owning the thread lock.

Modified:
  stable/11/sys/compat/linuxkpi/common/src/linux_rcu.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/compat/linuxkpi/common/src/linux_rcu.c
==============================================================================
--- stable/11/sys/compat/linuxkpi/common/src/linux_rcu.c	Mon Jan 20 08:55:27 2020	(r356906)
+++ stable/11/sys/compat/linuxkpi/common/src/linux_rcu.c	Mon Jan 20 09:16:06 2020	(r356907)
@@ -296,14 +296,13 @@ linux_synchronize_rcu(void)
 	    "linux_synchronize_rcu() can sleep");
 
 	td = curthread;
+	DROP_GIANT();
 
 	/*
 	 * Synchronizing RCU might change the CPU core this function
 	 * is running on. Save current values:
 	 */
 	thread_lock(td);
-
-	DROP_GIANT();
 
 	old_cpu = PCPU_GET(cpuid);
 	old_pinned = td->td_pinned;



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