Fix: syscall filtering: NULL pointer deref
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 23 Sep 2014 23:48:01 +0000 (19:48 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 26 Sep 2014 16:10:00 +0000 (12:10 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
lttng-syscalls.c

index cba0016007d95c190fc4a4987c0f727e8a7cefeb..1489934f3319bbad05de08d3c404f155bd2feac7 100644 (file)
@@ -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)
This page took 0.027151 seconds and 4 git commands to generate.