summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authormarkj <markj@FreeBSD.org>2016-10-02 01:18:34 +0000
committermarkj <markj@FreeBSD.org>2016-10-02 01:18:34 +0000
commitd367a4b29c851b280bbda5f7dc46d14fd9dfe5a8 (patch)
tree488bda4abad4224428425f9fa27a8480b4955578 /sys
parent667eddb95879f196b969957103569ae77c4cd420 (diff)
downloadFreeBSD-src-d367a4b29c851b280bbda5f7dc46d14fd9dfe5a8.zip
FreeBSD-src-d367a4b29c851b280bbda5f7dc46d14fd9dfe5a8.tar.gz
MFC r306220:
Re-check the systrace probe ID before calling dtrace_probe().
Diffstat (limited to 'sys')
-rw-r--r--sys/cddl/dev/systrace/systrace.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/cddl/dev/systrace/systrace.c b/sys/cddl/dev/systrace/systrace.c
index 88e680a..014a007 100644
--- a/sys/cddl/dev/systrace/systrace.c
+++ b/sys/cddl/dev/systrace/systrace.c
@@ -193,7 +193,8 @@ systrace_probe(struct syscall_args *sa, enum systrace_probe_t type, int retval)
memset(uargs, 0, sizeof(uargs));
if (type == SYSTRACE_ENTRY) {
- id = sa->callp->sy_entry;
+ if ((id = sa->callp->sy_entry) == DTRACE_IDNONE)
+ return;
if (sa->callp->sy_systrace_args_func != NULL)
/*
@@ -215,7 +216,8 @@ systrace_probe(struct syscall_args *sa, enum systrace_probe_t type, int retval)
*/
curthread->t_dtrace_systrace_args = uargs;
} else {
- id = sa->callp->sy_return;
+ if ((id = sa->callp->sy_return) == DTRACE_IDNONE)
+ return;
curthread->t_dtrace_systrace_args = NULL;
/* Set arg0 and arg1 as the return value of this syscall. */
OpenPOWER on IntegriCloud