[FIX] add linker and loader binaries to ignored list 54/58354/1
authorAnatolii Nikulin <nikulin.a@samsung.com>
Fri, 29 Jan 2016 13:14:35 +0000 (16:14 +0300)
committerAnatolii Nikulin <nikulin.a@samsung.com>
Fri, 29 Jan 2016 13:14:35 +0000 (16:14 +0300)
Change-Id: I5fd8d65c5d0661877408518694458182351bb694
Signed-off-by: Anatolii Nikulin <nikulin.a@samsung.com>
preload/preload_debugfs.c

index 791be82..9896aef 100644 (file)
@@ -147,6 +147,13 @@ static ssize_t loader_path_write(struct file *file, const char __user *buf,
 
        path[len - 1] = '\0';
        set_loader_file(path);
+
+       ret = preload_control_add_ignored_binary(path);
+       if (ret < 0) {
+               printk(PRELOAD_PREFIX "Cannot add loader %s to ignored list\n", path);
+               goto err;
+       }
+
        ret = len;
 
        return ret;
@@ -356,6 +363,12 @@ static ssize_t linker_path_write(struct file *file, const char __user *buf,
                goto linker_path_write_out;
        }
 
+       ret = preload_control_add_ignored_binary(path);
+       if (ret < 0) {
+               printk(PRELOAD_PREFIX "Cannot add linker %s to ignored list\n", path);
+               goto linker_path_write_out;
+       }
+
        ret = len;
 
 linker_path_write_out: