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>
Tue, 9 Feb 2021 19:31:34 +0000 (14:31 -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: I0666bbe996854696ac98e025eb02e5fced0540b1

include/lttng/kernel-version.h

index 747a674fc80cab132e0d7fe9ddf2e97b42e91c33..88f621e983f4fe8d5ffc502fe3f882c412f08d81 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.027166 seconds and 4 git commands to generate.