X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=probes%2Flttng-probe-user.c;h=099a66b229a46fcc90f7b5fd7e504a3806d7d0e6;hb=a824008cc30bf9a4b99aeb00657bbe2f0be9b653;hp=e92107d94cfbd1948eb3773deb6c55a228f48505;hpb=0470731263c128727ac6f52c12a4fa379d85262e;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 (;;) {