mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
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
35c5de54e8
commit
62ca80a7ff
1 changed files with 2 additions and 1 deletions
|
|
@ -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 a new issue