From ac9c98889cf83d797f36d430ae2eec8b5a5c9c20 Mon Sep 17 00:00:00 2001 From: bdrewery Date: Fri, 29 Jan 2016 00:44:28 +0000 Subject: filemon_open: Don't record a process to trace here. Only ioctl(FILEMON_SET_PID) should be setting the process-to-be-traced. MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division --- sys/dev/filemon/filemon.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'sys/dev/filemon') diff --git a/sys/dev/filemon/filemon.c b/sys/dev/filemon/filemon.c index 0ec8346..4f24bbb 100644 --- a/sys/dev/filemon/filemon.c +++ b/sys/dev/filemon/filemon.c @@ -221,10 +221,9 @@ filemon_open(struct cdev *dev, int oflags __unused, int devtype __unused, filemon = malloc(sizeof(struct filemon), M_FILEMON, M_WAITOK | M_ZERO); sx_init(&filemon->lock, "filemon"); + filemon->pid = -1; } - filemon->pid = curproc->p_pid; - devfs_set_cdevpriv(filemon, filemon_dtr); /* Get exclusive write access. */ -- cgit v1.1