From b737968d5f0badac76586270e7df4ce6447adc5a Mon Sep 17 00:00:00 2001 From: Michael Jeanson Date: Mon, 8 Feb 2021 15:32:47 -0500 Subject: [PATCH] fix: RT_PATCH_VERSION is close to overflow 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 Signed-off-by: Mathieu Desnoyers Change-Id: I0666bbe996854696ac98e025eb02e5fced0540b1 --- include/lttng/kernel-version.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/lttng/kernel-version.h b/include/lttng/kernel-version.h index 747a674f..88f621e9 100644 --- a/include/lttng/kernel-version.h +++ b/include/lttng/kernel-version.h @@ -166,11 +166,11 @@ /* 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 -- 2.34.1