Fix: correct typo in kernel version number

A typo in a preprocessor conditional verifying the range in which the
current kernel version is situated caused build failure for modules on
3.5.0 specifically, by trying to use the new api for block_rq_complete
which has not been backported from the 3.15 branch to the 3.5 branch.

Signed-off-by: Antoine Busque <antoine.busque@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fix: statedump handle oom case, handle errors

lttng_enumerate_file_descriptors should check the pointer returned by
__get_free_page() (check if NULL).

do_lttng_statedump should check the sub-function return values. For
lttng_enumerate_block_devices(), we allow -ENOSYS to continue (if not
implemented).

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fix: statedump: check whether "files" is NULL, RCU semantic fix

We need to check if p->files is NULL before passing it to
files_fdtable(). Moreover, since the fdt is now protected by RCU, we
have to assume it can change between the read from
lttng_enumerate_task_fd() and the internal in-kernel read in
iterate_fd(). Therefore, move this rcu dereference into
lttng_dump_one_fd(), and perform the appropriate checks on max fds.

Fixes #799

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Version 2.5.0-rc2

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Version 2.5.0

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Update vmscan instrumentation to 3.16 kernel

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Update compaction instrumentation to 3.16 kernel

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fix: noargs probes should calculate alignment and event length

A noargs probe could have event fields. noargs just means that the probe
does not receive any argument as parameter. However, it could very well
serialize data into fields (global variables, constants, etc).

It just happens that LTTng does not serialize any data in noargs events
at the moment, but this may very well change.

The if (0) with (void) variable access strategy to stop compiler from
complaining from unused variables does not seem to work as expected with
gcc 4.9.1. Use "unused" attribute instead.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Update statedump to 3.17 nsproxy locking

This Linux upstream commit introduces locking strategy back and forth:

commit 728dba3a39c66b3d8ac889ddbe38b5b1c264aec3
Author: Eric W. Biederman <ebiederm@xmission.com>
Date:   Mon Feb 3 19:13:49 2014 -0800

    namespaces: Use task_lock and not rcu to protect nsproxy

Use the task lock starting from kernel 3.17 rather than RCU to access
the task nsproxy.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Update kvm instrumentation: compile on 3.17-rc1

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>