svn commit: r295026 - head/sys/dev/filemon

Bryan Drewery bdrewery at FreeBSD.org
Fri Jan 29 00:44:30 UTC 2016


Author: bdrewery
Date: Fri Jan 29 00:44:28 2016
New Revision: 295026
URL: https://svnweb.freebsd.org/changeset/base/295026

Log:
  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

Modified:
  head/sys/dev/filemon/filemon.c

Modified: head/sys/dev/filemon/filemon.c
==============================================================================
--- head/sys/dev/filemon/filemon.c	Fri Jan 29 00:29:32 2016	(r295025)
+++ head/sys/dev/filemon/filemon.c	Fri Jan 29 00:44:28 2016	(r295026)
@@ -221,10 +221,9 @@ filemon_open(struct cdev *dev, int oflag
 		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. */


More information about the svn-src-head mailing list