Check NULL pointer.

This commit is contained in:
David Xu 2007-12-17 08:09:37 +00:00
parent baa15be0ea
commit 7fab871d8c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=174707

View File

@ -1407,7 +1407,16 @@ umtx_pi_adjust_locked(struct thread *td, u_char oldpri)
void void
umtx_pi_adjust(struct thread *td, u_char oldpri) umtx_pi_adjust(struct thread *td, u_char oldpri)
{ {
struct umtx_q *uq;
struct umtx_pi *pi;
uq = td->td_umtxq;
mtx_lock_spin(&umtx_lock); mtx_lock_spin(&umtx_lock);
/*
* Pick up the lock that td is blocked on.
*/
pi = uq->uq_pi_blocked;
if (pi != NULL)
umtx_pi_adjust_locked(td, oldpri); umtx_pi_adjust_locked(td, oldpri);
mtx_unlock_spin(&umtx_lock); mtx_unlock_spin(&umtx_lock);
} }