X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=probes%2Flttng-probe-user.c;h=099a66b229a46fcc90f7b5fd7e504a3806d7d0e6;hb=8e3b6653bf5bc3f64a6bc50d2fdce57ea5bbd4e8;hp=e92107d94cfbd1948eb3773deb6c55a228f48505;hpb=156a3977f8fa114924d7bbd2bd04c94fd2ac0649;p=lttng-modules.git diff --git a/probes/lttng-probe-user.c b/probes/lttng-probe-user.c index e92107d9..099a66b2 100644 --- a/probes/lttng-probe-user.c +++ b/probes/lttng-probe-user.c @@ -31,8 +31,12 @@ long lttng_strlen_user_inatomic(const char *addr) { long count = 0; - mm_segment_t old_fs = get_fs(); + mm_segment_t old_fs; + if (!addr) + return 0; + + old_fs = get_fs(); set_fs(KERNEL_DS); pagefault_disable(); for (;;) {