Avoid dereferencing the thread pointer in smb_iod_addrq() if it's NULL.
Fixes mdconfig -t vnode on smbfs: mdsetcred()'s "horrible kludge" calls into smbfs VOP_READ with a NULL uio_td.
This commit is contained in:
parent
6b8ecd0152
commit
5155733cbd
@ -401,7 +401,8 @@ smb_iod_addrq(struct smb_rq *rqp)
|
||||
int error;
|
||||
|
||||
SMBIODEBUG("\n");
|
||||
if (rqp->sr_cred->scr_td->td_proc == iod->iod_p) {
|
||||
if (rqp->sr_cred->scr_td != NULL &&
|
||||
rqp->sr_cred->scr_td->td_proc == iod->iod_p) {
|
||||
rqp->sr_flags |= SMBR_INTERNAL;
|
||||
SMB_IOD_RQLOCK(iod);
|
||||
TAILQ_INSERT_HEAD(&iod->iod_rqlist, rqp, sr_link);
|
||||
|
Loading…
Reference in New Issue
Block a user