Code must not unlock a mutex while owning the thread lock.
Reviewed by: hselasky, markj Sponsored by: Mellanox Technologies MFC after: 1 week Differential revision: https://reviews.freebsd.org/D23150
This commit is contained in:
parent
5452c16c21
commit
fedab1b499
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=356682
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user