- Assert for not leaking readers rw locks counter on userland return.
- Use a correct spin_cnt for KDTRACE_HOOK case in rw read lock. Sponsored by: EMC / Isilon storage division
This commit is contained in:
parent
569aad57d2
commit
e7a9eed7a8
@ -440,6 +440,9 @@ __rw_rlock(volatile uintptr_t *c, const char *file, int line)
|
||||
break;
|
||||
cpu_spinwait();
|
||||
}
|
||||
#ifdef KDTRACE_HOOKS
|
||||
spin_cnt += rowner_loops - i;
|
||||
#endif
|
||||
if (i != rowner_loops)
|
||||
continue;
|
||||
}
|
||||
|
@ -152,6 +152,9 @@ userret(struct thread *td, struct trapframe *frame)
|
||||
("userret: Returning in a critical section"));
|
||||
KASSERT(td->td_locks == 0,
|
||||
("userret: Returning with %d locks held", td->td_locks));
|
||||
KASSERT(td->td_rw_rlocks == 0,
|
||||
("userret: Returning with %d rwlocks held in read mode",
|
||||
td->td_rw_rlocks));
|
||||
KASSERT((td->td_pflags & TDP_NOFAULTING) == 0,
|
||||
("userret: Returning with pagefaults disabled"));
|
||||
KASSERT(td->td_no_sleeping == 0,
|
||||
|
Loading…
Reference in New Issue
Block a user