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;
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to