From 55b48b3b6f5e2a07ed1f3f36b652c5a0fd3a266c Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Fri, 7 Jul 2017 18:11:33 +0200 Subject: compat: work around odd kernels that backport kvfree --- src/compat/compat.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/compat/compat.h b/src/compat/compat.h index 8d9038a..a80039d 100644 --- a/src/compat/compat.h +++ b/src/compat/compat.h @@ -326,13 +326,15 @@ static inline void *kvzalloc(size_t size, gfp_t flags) #if ((LINUX_VERSION_CODE < KERNEL_VERSION(3, 15, 0) && LINUX_VERSION_CODE >= KERNEL_VERSION(3, 13, 0)) || LINUX_VERSION_CODE < KERNEL_VERSION(3, 12, 41)) && !defined(ISUBUNTU1404) #include -static inline void kvfree(const void *addr) +#include +static inline void kvfree_ours(const void *addr) { if (is_vmalloc_addr(addr)) vfree(addr); else kfree(addr); } +#define kvfree kvfree_ours #endif #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 9) -- cgit v1.2.3-59-g8ed1b