Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 Jan 2016 00:44:28 +0000 (UTC)
From:      Bryan Drewery <bdrewery@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r295026 - head/sys/dev/filemon
Message-ID:  <201601290044.u0T0iSiH084575@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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. */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201601290044.u0T0iSiH084575>