livepatch-patch-hook: Add upper bound kernel version for immediate flag

Effective Kernel v4.16, the immediate flag is removed by upstream
kernel commit d0807da78e11 ("livepatch: Remove immediate feature").
Add an upper bound kernel version check for inclusion of the
immediate flag.

Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
This commit is contained in:
Kamalesh Babulal 2018-03-07 13:04:52 +05:30
parent 481d8c4bc2
commit d651cd994c
1 changed files with 2 additions and 1 deletions

View File

@ -47,7 +47,8 @@
#define HAVE_SYMPOS
#endif
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0) || \
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0) && \
LINUX_VERSION_CODE <= KERNEL_VERSION(4, 15, 0)) || \
defined(RHEL_RELEASE_CODE)
#define HAVE_IMMEDIATE
#endif