SHARE
TWEET

Untitled

a guest Apr 21st, 2019 73 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. From 00a970f9ce4a97e8f46f24c90c0242a658143457 Mon Sep 17 00:00:00 2001
  2. From: Nils Andreas Svee <me@lochnair.net>
  3. Date: Sun, 3 Mar 2019 23:44:16 +0100
  4. Subject: [PATCH] Only use __vmalloc for now
  5.  
  6. ---
  7.  src/compat/compat.h | 10 ----------
  8.  1 file changed, 10 deletions(-)
  9.  
  10. diff --git a/src/compat/compat.h b/src/compat/compat.h
  11. index 7a61e4c..f2b3d5e 100644
  12. --- a/src/compat/compat.h
  13. +++ b/src/compat/compat.h
  14. @@ -464,16 +464,6 @@ static inline __be32 our_inet_confirm_addr(struct net *net, struct in_device *in
  15.  #include <linux/slab.h>
  16.  static inline void *kvmalloc_ours(size_t size, gfp_t flags)
  17.  {
  18. -   gfp_t kmalloc_flags = flags;
  19. -   void *ret;
  20. -   if (size > PAGE_SIZE) {
  21. -       kmalloc_flags |= __GFP_NOWARN;
  22. -       if (!(kmalloc_flags & __GFP_REPEAT) || (size <= PAGE_SIZE << PAGE_ALLOC_COSTLY_ORDER))
  23. -           kmalloc_flags |= __GFP_NORETRY;
  24. -   }
  25. -   ret = kmalloc(size, kmalloc_flags);
  26. -   if (ret || size <= PAGE_SIZE)
  27. -       return ret;
  28.     return __vmalloc(size, flags, PAGE_KERNEL);
  29.  }
  30.  static inline void *kvzalloc_ours(size_t size, gfp_t flags)
  31. --
  32. 2.21.0
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top