CVSROOT: /cvs
Module name: src
Changes by: [email protected] 2020/04/02 21:20:12
Modified files:
sys/kern : kern_ktrace.c
Log message:
Take an explicit write reference when associating a thread with a ktrace
vnode. This lets other parts of the kernel see the vnode as active for
writing. In particular, now quotaon_vnode() properly sets up quotas for
ktrace vnodes. This fixes a crash that could happen if quotas were
turned on while a process was ktraced.
ktrace vnodes are opened for writing and an initial write reference
is provided for them by vn_open(9). However, this reference is removed,
too early, when sys_ktrace() calls vn_close(9).
Crash reported and fix tested by Bryan Stenson
OK mpi@