exec: Cease tracing if credentials will change with the new image.
authorbdrewery <bdrewery@FreeBSD.org>
Fri, 27 May 2016 23:57:43 +0000 (23:57 +0000)
committerbdrewery <bdrewery@FreeBSD.org>
Fri, 27 May 2016 23:57:43 +0000 (23:57 +0000)
commit30f60627481ce2dfa6393787736c1032f81f8ec1
treedd78097b4197148e5477d4d89f17b6abee850f87
parentc52b14bd3fc520bca93e086095513de6416137c8
exec: Cease tracing if credentials will change with the new image.

This also prevents tracing to a P_INEXEC process since it could race
with other processes attaching to it in filemon_event_process_exec() due
to the filemon_get_proc() race of incrementing ref and then locking the
filemon.  With the no-P_INEXEC invariant in place the p_filemon may only
be the same or NULL when trying to drop it in
filemon_event_process_exec().

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D6545
sys/dev/filemon/filemon.c
sys/dev/filemon/filemon_wrapper.c