aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/vfs_lookup.c
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2013-02-21 19:02:50 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2013-02-21 19:02:50 +0000
commit593efaf9f7ff8b4a961e61f55c333e63ee36495c (patch)
tree089655cb610bf1daca917a806eaed3dfb2554455 /sys/kern/vfs_lookup.c
parentae40be8cf0ea07df25b46f95e47fb17a992edf4a (diff)
downloadsrc-593efaf9f7ff8b4a961e61f55c333e63ee36495c.tar.gz
src-593efaf9f7ff8b4a961e61f55c333e63ee36495c.zip
Further refine the handling of stop signals in the NFS client. The
changes in r246417 were incomplete as they did not add explicit calls to sigdeferstop() around all the places that previously passed SBDRY to _sleep(). In addition, nfs_getcacheblk() could trigger a write RPC from getblk() resulting in sigdeferstop() recursing. Rather than manually deferring stop signals in specific places, change the VFS_*() and VOP_*() methods to defer stop signals for filesystems which request this behavior via a new VFCF_SBDRY flag. Note that this has to be a VFC flag rather than a MNTK flag so that it works properly with VFS_MOUNT() when the mount is not yet fully constructed. For now, only the NFS clients are set this new flag in VFS_SET(). A few other related changes: - Add an assertion to ensure that TDF_SBDRY doesn't leak to userland. - When a lookup request uses VOP_READLINK() to follow a symlink, mark the request as being on behalf of the thread performing the lookup (cnp_thread) rather than using a NULL thread pointer. This causes NFS to properly handle signals during this VOP on an interruptible mount. PR: kern/176179 Reported by: Russell Cattelan (sigdeferstop() recursion) Reviewed by: kib MFC after: 1 month
Notes
Notes: svn path=/head/; revision=247116
Diffstat (limited to 'sys/kern/vfs_lookup.c')
-rw-r--r--sys/kern/vfs_lookup.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c
index e5ee4f63879e..fbde152d6a6e 100644
--- a/sys/kern/vfs_lookup.c
+++ b/sys/kern/vfs_lookup.c
@@ -339,7 +339,7 @@ namei(struct nameidata *ndp)
auio.uio_offset = 0;
auio.uio_rw = UIO_READ;
auio.uio_segflg = UIO_SYSSPACE;
- auio.uio_td = (struct thread *)0;
+ auio.uio_td = td;
auio.uio_resid = MAXPATHLEN;
error = VOP_READLINK(ndp->ni_vp, &auio, cnp->cn_cred);
if (error) {