diff options
author | Alexander Aksenov <a.aksenov@samsung.com> | 2015-09-08 14:29:16 +0300 |
---|---|---|
committer | Alexander Aksenov <a.aksenov@samsung.com> | 2015-09-12 13:28:52 +0300 |
commit | c53472b6a23ec8a39f1ed80ffe1b0bad262120ba (patch) | |
tree | 44cd850952dc44ec55dec81ef57265cd2e280d59 | |
parent | e9b7d5c7de93940e0d05461df431b505a6f99fb8 (diff) | |
download | swap-modules-c53472b6a23ec8a39f1ed80ffe1b0bad262120ba.tar.gz swap-modules-c53472b6a23ec8a39f1ed80ffe1b0bad262120ba.tar.bz2 swap-modules-c53472b6a23ec8a39f1ed80ffe1b0bad262120ba.zip |
[FIX] Preload: memory allocation in atomic
kmalloc(..., GFP_KERNEL) -> kmalloc(..., GFP_ATOMIC)
cause executed in handlers
Change-Id: If89c5807d96fee9137fb8b0919b7ed4428772ab6
Signed-off-by: Alexander Aksenov <a.aksenov@samsung.com>
-rw-r--r-- | preload/preload_threads.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/preload/preload_threads.c b/preload/preload_threads.c index 20840ac6..b8c2b772 100644 --- a/preload/preload_threads.c +++ b/preload/preload_threads.c @@ -127,7 +127,7 @@ static inline void __set_slot(struct thread_slot *slot, static inline int __add_to_disable_list(struct thread_slot *slot, unsigned long disable_addr) { - struct disabled_addr *da = kmalloc(sizeof(*da), GFP_KERNEL); + struct disabled_addr *da = kmalloc(sizeof(*da), GFP_ATOMIC); if (da == NULL) return -ENOMEM; @@ -154,7 +154,7 @@ static inline struct disabled_addr *__find_disabled_addr(struct thread_slot *slo /* Adds a new slot */ static inline struct thread_slot *__grow_slot(void) { - struct thread_slot *tmp = kmalloc(sizeof(*tmp), GFP_KERNEL); + struct thread_slot *tmp = kmalloc(sizeof(*tmp), GFP_ATOMIC); if (tmp == NULL) return NULL; |