diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-07-07 18:11:33 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-07-07 18:11:33 +0200 |
commit | 24f52add6f34e91eda32a6fedca139ffb9cb236e (patch) | |
tree | 5b35f15b0d7686e84552fbe09bf4ff034b53c57c /src/compat | |
parent | ea4d5d3be54c7160d0c9ea51f77b227052549cb7 (diff) |
compat: work around odd kernels that backport kvfree
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/compat')
-rw-r--r-- | src/compat/compat.h | 4 |
1 files changed, 3 insertions, 1 deletions
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 <linux/vmalloc.h> -static inline void kvfree(const void *addr) +#include <linux/mm.h> +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) |