summaryrefslogtreecommitdiffstats
path: root/sys/nfsclient/nfs_bio.c
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2002-06-28 21:53:08 +0000
committerjhb <jhb@FreeBSD.org>2002-06-28 21:53:08 +0000
commit8969d48c6a2e21220ae7000e4c28ee28457f6cfb (patch)
treef6302b3f761931fc1074cb1657defdbc4fdbe2fa /sys/nfsclient/nfs_bio.c
parent6a65638bb394a78dc4803ab26316afa31d605667 (diff)
downloadFreeBSD-src-8969d48c6a2e21220ae7000e4c28ee28457f6cfb.zip
FreeBSD-src-8969d48c6a2e21220ae7000e4c28ee28457f6cfb.tar.gz
In namei(), we use a NULL thread for uio_td when doing a VOP_READLINK().
nfs_readlink() calls nfs_bioread() which passes in uio_td as the thread argument to nfs_getcacheblk(). In nfs_getcacheblk() we dereference the thread pointer to get a process pointer to pass to nfs_sigintr(). This obviously results in a panic. :) Rather than change nfs_getcacheblk() to check if the thread pointer is NULL when calling nfs_sigintr() like other callers do, change nfs_sigintr() to take a thread as the last argument instead of a process so none of the callers have to care if the thread is NULL or not.
Diffstat (limited to 'sys/nfsclient/nfs_bio.c')
-rw-r--r--sys/nfsclient/nfs_bio.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/nfsclient/nfs_bio.c b/sys/nfsclient/nfs_bio.c
index 40fac72..897346d 100644
--- a/sys/nfsclient/nfs_bio.c
+++ b/sys/nfsclient/nfs_bio.c
@@ -1026,7 +1026,7 @@ nfs_getcacheblk(struct vnode *vp, daddr_t bn, int size, struct thread *td)
if (nmp->nm_flag & NFSMNT_INT) {
bp = getblk(vp, bn, size, PCATCH, 0);
while (bp == (struct buf *)0) {
- if (nfs_sigintr(nmp, (struct nfsreq *)0, td->td_proc))
+ if (nfs_sigintr(nmp, (struct nfsreq *)0, td))
return ((struct buf *)0);
bp = getblk(vp, bn, size, 0, 2 * hz);
}
@@ -1076,7 +1076,7 @@ nfs_vinvalbuf(struct vnode *vp, int flags, struct ucred *cred,
error = tsleep((caddr_t)&np->n_flag, PRIBIO + 2, "nfsvinval",
slptimeo);
if (error && intrflg &&
- nfs_sigintr(nmp, (struct nfsreq *)0, td->td_proc))
+ nfs_sigintr(nmp, (struct nfsreq *)0, td))
return (EINTR);
}
@@ -1087,7 +1087,7 @@ nfs_vinvalbuf(struct vnode *vp, int flags, struct ucred *cred,
error = vinvalbuf(vp, flags, cred, td, slpflag, 0);
while (error) {
if (intrflg &&
- nfs_sigintr(nmp, (struct nfsreq *)0, td->td_proc)) {
+ nfs_sigintr(nmp, (struct nfsreq *)0, td)) {
np->n_flag &= ~NFLUSHINPROG;
if (np->n_flag & NFLUSHWANT) {
np->n_flag &= ~NFLUSHWANT;
@@ -1200,7 +1200,7 @@ again:
error = tsleep(&nmp->nm_bufq, slpflag | PRIBIO,
"nfsaio", slptimeo);
if (error) {
- if (nfs_sigintr(nmp, NULL, td ? td->td_proc : NULL))
+ if (nfs_sigintr(nmp, NULL, td))
return (EINTR);
if (slpflag == PCATCH) {
slpflag = 0;
OpenPOWER on IntegriCloud