diff options
author | Tim J. Robbins <tjr@FreeBSD.org> | 2003-06-14 15:45:34 +0000 |
---|---|---|
committer | Tim J. Robbins <tjr@FreeBSD.org> | 2003-06-14 15:45:34 +0000 |
commit | 62ca80a7fffe9e7c709cfc4a4bde1e5bd9d86112 (patch) | |
tree | 79ad7846422b75ac6056ffc394883d7844dfdd7a /sys/netsmb | |
parent | 35c5de54e862e08e8be472a52efc28db5a0f9196 (diff) | |
download | src-62ca80a7fffe9e7c709cfc4a4bde1e5bd9d86112.tar.gz src-62ca80a7fffe9e7c709cfc4a4bde1e5bd9d86112.zip |
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.
Notes
Notes:
svn path=/head/; revision=116339
Diffstat (limited to 'sys/netsmb')
-rw-r--r-- | sys/netsmb/smb_iod.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/netsmb/smb_iod.c b/sys/netsmb/smb_iod.c index 86536bbfa9da..2c5e2c3917d2 100644 --- a/sys/netsmb/smb_iod.c +++ b/sys/netsmb/smb_iod.c @@ -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); |