summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2012-01-17 16:20:50 +0000
committeralc <alc@FreeBSD.org>2012-01-17 16:20:50 +0000
commit091f2726d5fe887255046aa5296fa471765805ec (patch)
treefd361c06b51a1d3a10aa336e50e08ed1b4f3c289 /sys/kern
parent01d570a9599ba33cf4646ecb7bd75a81d283fc1d (diff)
downloadFreeBSD-src-091f2726d5fe887255046aa5296fa471765805ec.zip
FreeBSD-src-091f2726d5fe887255046aa5296fa471765805ec.tar.gz
Explain why it is safe to unlock the vnode.
Requested by: kib
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/imgact_elf.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c
index f7e5752..4da2ad78 100644
--- a/sys/kern/imgact_elf.c
+++ b/sys/kern/imgact_elf.c
@@ -800,6 +800,9 @@ __CONCAT(exec_, __elfN(imgact))(struct image_params *imgp)
* than zero. Consequently, the vnode lock is not needed by vrele().
* However, in cases where the vnode lock is external, such as nullfs,
* v_usecount may become zero.
+ *
+ * The VV_TEXT flag prevents modifications to the executable while
+ * the vnode is unlocked.
*/
VOP_UNLOCK(imgp->vp, 0);
OpenPOWER on IntegriCloud