]> git.lttng.org Git - lttng-modules.git/commitdiff
fix: RT_PATCH_VERSION is close to overflow
authorMichael Jeanson <mjeanson@efficios.com>
Mon, 8 Feb 2021 20:32:47 +0000 (15:32 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 10 Feb 2021 15:11:53 +0000 (10:11 -0500)
We allocated only 8bits for RT_PATCH_VERSION in LTTNG_RT_VERSION_CODE,
the current RT patch version for the 4.4 branch is currently 214 which
is getting close to 256. Bump it to 16bits to avoid breakage in the
future.

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I70d4794b1a42a54fce5f801c9245354cbf54d975

lttng-kernel-version.h

index 2044203a41f4b7523ca01610c2d8c1213a894820..9ce339b19b0d4a1a45b8e5f8b0f2641715848352 100644 (file)
 /* RT patch */
 
 #define LTTNG_RT_KERNEL_VERSION(a, b, c, d) \
-       (((LTTNG_KERNEL_VERSION(a, b, c)) << 8) + (d))
+       (((LTTNG_KERNEL_VERSION(a, b, c)) << 16) + (d))
 
 #ifdef RT_PATCH_VERSION
 #define LTTNG_RT_VERSION_CODE \
-       ((LTTNG_LINUX_VERSION_CODE << 8) + RT_PATCH_VERSION)
+       ((LTTNG_LINUX_VERSION_CODE << 16) + RT_PATCH_VERSION)
 #else
 #define LTTNG_RT_VERSION_CODE  0
 #endif
This page took 0.030834 seconds and 4 git commands to generate.