lttng-modules:stable-2.5

Last commit made on 2015-09-09
Get this branch:
git clone -b stable-2.5 https://git.launchpad.net/lttng-modules

Branch merges

Branch information

Name:
stable-2.5
Repository:
lp:lttng-modules

Recent commits

e4e92cf... by Mathieu Desnoyers

Version 2.5.6

Signed-off-by: Mathieu Desnoyers <email address hidden>

6a4ad2d... by Mathieu Desnoyers

Fix: use after free in channel release

Signed-off-by: Mathieu Desnoyers <email address hidden>

180243e... by Michael Jeanson <email address hidden>

Fix: build failure on 2.6.36

Fixes build failure on the 2.6.36 kernel branch which misses the
vzalloc() function.

Signed-off-by: Michael Jeanson <email address hidden>
Signed-off-by: Mathieu Desnoyers <email address hidden>

640886d... by Alex Montplaisir

Fix: Update kmem event for Ubuntu's 3.16 kernel

The upstream patch in question in commit 72906e1 was cherry-picked into
Ubuntu's 3.16 kernel backport branch (called lts-utopic). The version
check should also include this branch.

The other backport branch, lts-vivid, and all following ones will be
covered by the standard

  LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,2)

check, so should not require other workarounds.

References #889.

Signed-off-by: Alexandre Montplaisir <email address hidden>
Signed-off-by: Mathieu Desnoyers <email address hidden>

434c669... by Alex Montplaisir

Fix: Update kmem event for recent Ubuntu kernel

Ubuntu backported a patch into their 3.13 (Trusty) branch which
changes kmem event definition.

Upstream commit
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=99592d598eca62bdbbf62b59941c189176dfc614
first appears in 4.0 (and was later backported to 3.19.2).
We already have the proper check for this.

This corresponds to Ubuntu commit
http://kernel.ubuntu.com/git/ubuntu/ubuntu-trusty.git/commit/?id=d938e4bff1089a1f4757ed94a5cace803c6a363b
which was first released with 3.13.0-50.82.
This required adding a new check specifically for the
Ubuntu version.

Signed-off-by: Alexandre Montplaisir <email address hidden>
Signed-off-by: Mathieu Desnoyers <email address hidden>

7d5f6ce... by Mathieu Desnoyers

Fix: kmem probe with Ubuntu 3.13 kernels

Fixes an undefined reference to get_pageblock_flags_mask.

Signed-off-by: Mathieu Desnoyers <email address hidden>

66861b2... by Mathieu Desnoyers

Implement wrapper around get_pfnblock_flags_mask

This is used by kmem instrumentation, and changed in 4.0.0. This change
has been backported to 3.19.2 stable kernel.

Signed-off-by: Mathieu Desnoyers <email address hidden>

b02a8b7... by Martin Leisener <email address hidden>

Fix: Building the event list fails on fragmented memory

On a small arm imx6 solo with 256MB RAM it often happens that memory
becomes fragmented rather quickly, so that kmalloc will not be able to
get enough consecutive pages (enocuntered for example if you enable all
kernel events: lttng enable-event -k syscall --all).

This patch switches the allocation to vmalloc. Tested for x86 on Ubuntu
12.04 Lts and on imx6 solo 256MB RAM

If this patch is not applied, you can identify low and/or fragmented
memory failures by looking at the kernel ring buffer (please ignore DMA,
it is due to some memory setup misconfiguration, should read Normal):

...
[ 321.993820] lttng-sessiond: page allocation failure: order:4, mode:0x1040d0
...
[ 321.994711] lowmem_reserve[]: 0 0 0
[ 321.994727] DMA: 801*4kB (UEMC) 424*8kB (EMC) 355*16kB (UEMC) 344*32kB (MC) 340*64kB (C) 8*128kB (C) 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB 0*8192kB 0*16384kB 0*32768kB = 46068kB

[ Edit by Mathieu: use vzalloc() rather than vmalloc() + memset 0. ]

Signed-off-by: Martin Leisener <email address hidden>
Signed-off-by: Mathieu Desnoyers <email address hidden>

54028e4... by Mathieu Desnoyers

Fix: use after free on metadata cache reallocation

When the metadata cache is expanded (reallocated) by
lttng_metadata_printf(), the metadata cache reader
(lttng_metadata_output_channel()) may use freed memory, because the
metadata cache is not protected from concurrent read accesses. The
metadata cache updates are protected from each other by the sessions
mutex, but metadata cache reads do not hold the sessions mutex.
Actually, the comment on top of lttng_metadata_output_channel() stating
"We have exclusive access to our metadata buffer (protected by the
sessions_mutex)" is simply wrong, because this mutex is never held when
calling lttng_metadata_output_channel().

Promote the per-stream lock to the metadata cache used by each of those
metadata streams, thus ensuring mutual exclusion between metadata cache
reallocation and readers.

Signed-off-by: Mathieu Desnoyers <email address hidden>

a732ee0... by Mathieu Desnoyers

Version 2.5.5

Signed-off-by: Mathieu Desnoyers <email address hidden>