From 11aca4935c244a55f0d418301be0e2db34f93279 Mon Sep 17 00:00:00 2001 From: "Tim J. Robbins" Date: Wed, 5 Mar 2003 09:52:04 +0000 Subject: [PATCH] Handle the case where a_uio->uio_td == NULL properly in coda_readlink(). This happens when called from lookup(). --- sys/coda/coda_vnops.c | 3 ++- sys/fs/coda/coda_vnops.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/coda/coda_vnops.c b/sys/coda/coda_vnops.c index 8fdcdbfd51c0..caa4738956fc 100644 --- a/sys/coda/coda_vnops.c +++ b/sys/coda/coda_vnops.c @@ -798,7 +798,8 @@ coda_readlink(v) return(error); } - error = venus_readlink(vtomi(vp), &cp->c_fid, cred, td->td_proc, &str, &len); + error = venus_readlink(vtomi(vp), &cp->c_fid, cred, + td != NULL ? td->td_proc : NULL, &str, &len); if (!error) { uiop->uio_rw = UIO_READ; diff --git a/sys/fs/coda/coda_vnops.c b/sys/fs/coda/coda_vnops.c index 8fdcdbfd51c0..caa4738956fc 100644 --- a/sys/fs/coda/coda_vnops.c +++ b/sys/fs/coda/coda_vnops.c @@ -798,7 +798,8 @@ coda_readlink(v) return(error); } - error = venus_readlink(vtomi(vp), &cp->c_fid, cred, td->td_proc, &str, &len); + error = venus_readlink(vtomi(vp), &cp->c_fid, cred, + td != NULL ? td->td_proc : NULL, &str, &len); if (!error) { uiop->uio_rw = UIO_READ;