]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/blobdiff - drivers/misc/tegra-profiler/mmap.c
misc: tegra-profiler: fix debug preempt warnings
[sojka/nv-tegra/linux-3.10.git] / drivers / misc / tegra-profiler / mmap.c
index 0511c48111ba21a08692a2038252ff82caabb03f..2347047d98736fc84e3fda87e0a29a907d3beff3 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * drivers/misc/tegra-profiler/mmap.c
  *
- * Copyright (c) 2014, NVIDIA CORPORATION.  All rights reserved.
+ * Copyright (c) 2015, NVIDIA CORPORATION.  All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms and conditions of the GNU General Public License,
@@ -76,7 +76,7 @@ void quadd_process_mmap(struct vm_area_struct *vma, pid_t pid)
        if (!(vma->vm_flags & VM_EXEC))
                return;
 
-       tmp_buf = kzalloc(PATH_MAX + sizeof(u64), GFP_KERNEL);
+       tmp_buf = kzalloc(PATH_MAX + sizeof(u64), GFP_ATOMIC);
        if (!tmp_buf)
                return;
 
@@ -88,11 +88,7 @@ void quadd_process_mmap(struct vm_area_struct *vma, pid_t pid)
                if (IS_ERR(file_name))
                        goto out;
 
-               if (strstr(file_name, " (deleted)"))
-                       goto out;
-
                length = strlen(file_name) + 1;
-
                is_file_exists = 1;
        } else {
                const char *name = NULL;
@@ -168,7 +164,7 @@ int quadd_get_current_mmap(pid_t pid)
 
        pr_info("Get mapped memory objects\n");
 
-       tmp_buf = kzalloc(PATH_MAX + sizeof(u64), GFP_KERNEL);
+       tmp_buf = kzalloc(PATH_MAX + sizeof(u64), GFP_ATOMIC);
        if (!tmp_buf)
                return -ENOMEM;
 
@@ -184,9 +180,6 @@ int quadd_get_current_mmap(pid_t pid)
                        if (IS_ERR(file_name))
                                continue;
 
-                       if (strstr(file_name, " (deleted)"))
-                               continue;
-
                        length = strlen(file_name) + 1;
                        is_file_exists = 1;
                } else {