From: Francis Deslauriers Date: Tue, 28 Jan 2020 22:19:20 +0000 (-0500) Subject: Fix: lttng-syscalls.c: marking wrong syscall probe as unregistered X-Git-Tag: v2.11.2~14 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=6ad0e68b43c3e52fcb3d47c4d823a7b84aeb443a;p=lttng-modules.git Fix: lttng-syscalls.c: marking wrong syscall probe as unregistered When calling `lttng_syscalls_unregister()` we currently mark as unregistered the wrong syscall probe type. Concretely, when we unregister "sys_exit" we wrongfully mark that sys_enter is unregistered and vice versa. Given than currently entry and exit probes are always enabled together (except on internal errors), the effect of this bug is not user-visible. Signed-off-by: Francis Deslauriers Signed-off-by: Mathieu Desnoyers Change-Id: I64acf6a941a3d1fa1bf8be424f834ddb7fb92ace --- diff --git a/lttng-syscalls.c b/lttng-syscalls.c index ebd9246c..7a2d02a9 100644 --- a/lttng-syscalls.c +++ b/lttng-syscalls.c @@ -905,15 +905,15 @@ int lttng_syscalls_unregister(struct lttng_channel *chan) if (!chan->sc_table) return 0; if (chan->sys_enter_registered) { - ret = lttng_wrapper_tracepoint_probe_unregister("sys_exit", - (void *) syscall_exit_probe, chan); + ret = lttng_wrapper_tracepoint_probe_unregister("sys_enter", + (void *) syscall_entry_probe, chan); if (ret) return ret; chan->sys_enter_registered = 0; } if (chan->sys_exit_registered) { - ret = lttng_wrapper_tracepoint_probe_unregister("sys_enter", - (void *) syscall_entry_probe, chan); + ret = lttng_wrapper_tracepoint_probe_unregister("sys_exit", + (void *) syscall_exit_probe, chan); if (ret) return ret; chan->sys_exit_registered = 0;