From: Mathieu Desnoyers Date: Tue, 23 Sep 2014 23:48:01 +0000 (-0400) Subject: Fix: syscall filtering: NULL pointer deref X-Git-Tag: v2.6.0-rc1~25 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=cecef7f86625593d7e26337294ceda7252557f59;p=lttng-modules.git Fix: syscall filtering: NULL pointer deref Signed-off-by: Mathieu Desnoyers --- diff --git a/lttng-syscalls.c b/lttng-syscalls.c index cba00160..1489934f 100644 --- a/lttng-syscalls.c +++ b/lttng-syscalls.c @@ -1060,18 +1060,18 @@ int lttng_syscall_filter_disable(struct lttng_channel *chan, goto error; } if (syscall_nr >= 0) { - if (!test_bit(syscall_nr, chan->sc_filter->sc)) { + if (!test_bit(syscall_nr, filter->sc)) { ret = -EEXIST; goto error; } - bitmap_clear(chan->sc_filter->sc, syscall_nr, 1); + bitmap_clear(filter->sc, syscall_nr, 1); } if (compat_syscall_nr >= 0) { - if (!test_bit(compat_syscall_nr, chan->sc_filter->sc_compat)) { + if (!test_bit(compat_syscall_nr, filter->sc_compat)) { ret = -EEXIST; goto error; } - bitmap_clear(chan->sc_filter->sc_compat, compat_syscall_nr, 1); + bitmap_clear(filter->sc_compat, compat_syscall_nr, 1); } apply_filter: if (!chan->sc_filter)