[FIX] US Manager: kmalloc GFP flag 66/48066/1
authorAlexander Aksenov <a.aksenov@samsung.com>
Tue, 8 Sep 2015 10:28:58 +0000 (13:28 +0300)
committerAlexander Aksenov <a.aksenov@samsung.com>
Sat, 12 Sep 2015 10:28:44 +0000 (13:28 +0300)
In pfg_create()
   create_img_proc()
   create_img_file()
   create_img_ip()

kmalloc(..., GFP_KERNEL) -> kmalloc(..., GFP_ATOMIC)

cause called only spinlocks.

Change-Id: I0a8b4a5c132b9c76e54515ec75f80c807b2128ad
Signed-off-by: Alexander Aksenov <a.aksenov@samsung.com>
us_manager/img/img_file.c
us_manager/img/img_ip.c
us_manager/img/img_proc.c
us_manager/pf/pf_group.c

index 2b5bbcd..d4f6596 100644 (file)
@@ -41,7 +41,7 @@ struct img_file *create_img_file(struct dentry *dentry)
 {
        struct img_file *file;
 
-       file = kmalloc(sizeof(*file), GFP_KERNEL);
+       file = kmalloc(sizeof(*file), GFP_ATOMIC);
        if (file == NULL) {
                pr_err("%s: failed to allocate memory\n", __func__);
                return NULL;
index ef0d0fe..8d7270c 100644 (file)
@@ -38,7 +38,7 @@ struct img_ip *create_img_ip(unsigned long addr, struct probe_info *info)
 {
        struct img_ip *ip;
 
-       ip = kmalloc(sizeof(*ip), GFP_KERNEL);
+       ip = kmalloc(sizeof(*ip), GFP_ATOMIC);
        if (ip) {
                struct probe_info *info_new;
 
index e591b27..39be315 100644 (file)
@@ -50,7 +50,7 @@ struct img_proc *create_img_proc(void)
 {
        struct img_proc *proc;
 
-       proc = kmalloc(sizeof(*proc), GFP_KERNEL);
+       proc = kmalloc(sizeof(*proc), GFP_ATOMIC);
        if (proc) {
                INIT_LIST_HEAD(&proc->file_list);
                rwlock_init(&proc->rwlock);
index 3303b21..bed4849 100644 (file)
@@ -80,7 +80,7 @@ static void free_pl_struct(struct pl_struct *pls)
 
 static struct pf_group *pfg_create(void)
 {
-       struct pf_group *pfg = kmalloc(sizeof(*pfg), GFP_KERNEL);
+       struct pf_group *pfg = kmalloc(sizeof(*pfg), GFP_ATOMIC);
 
        if (pfg == NULL)
                return NULL;