summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2020-01-13 14:30:19 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2020-01-13 14:30:19 +0000
commitfedab1b4998d10f072d601bf3b0e1cb50a110095 (patch)
tree00fa2c82614c7d941611243dc7bf274835090126
parent5452c16c2138f6f68e7c447a80856a779e5eea6f (diff)
Notes
-rw-r--r--sys/compat/linuxkpi/common/src/linux_rcu.c3
-rw-r--r--sys/kern/subr_epoch.c2
2 files changed, 2 insertions, 3 deletions
diff --git a/sys/compat/linuxkpi/common/src/linux_rcu.c b/sys/compat/linuxkpi/common/src/linux_rcu.c
index e62e475aa859..6b6eb290a906 100644
--- a/sys/compat/linuxkpi/common/src/linux_rcu.c
+++ b/sys/compat/linuxkpi/common/src/linux_rcu.c
@@ -298,6 +298,7 @@ linux_synchronize_rcu(void)
"linux_synchronize_rcu() can sleep");
td = curthread;
+ DROP_GIANT();
/*
* Synchronizing RCU might change the CPU core this function
@@ -305,8 +306,6 @@ linux_synchronize_rcu(void)
*/
thread_lock(td);
- DROP_GIANT();
-
old_cpu = PCPU_GET(cpuid);
old_pinned = td->td_pinned;
old_prio = td->td_priority;
diff --git a/sys/kern/subr_epoch.c b/sys/kern/subr_epoch.c
index a2b99d12a390..39fe3125395e 100644
--- a/sys/kern/subr_epoch.c
+++ b/sys/kern/subr_epoch.c
@@ -610,8 +610,8 @@ epoch_wait_preempt(epoch_t epoch)
KASSERT(!in_epoch(epoch), ("epoch_wait_preempt() called in the middle "
"of an epoch section of the same epoch"));
#endif
- thread_lock(td);
DROP_GIANT();
+ thread_lock(td);
old_cpu = PCPU_GET(cpuid);
old_pinned = td->td_pinned;