summaryrefslogtreecommitdiff
path: root/drivers/misc/tegra-profiler/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/misc/tegra-profiler/main.c')
-rw-r--r--drivers/misc/tegra-profiler/main.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/misc/tegra-profiler/main.c b/drivers/misc/tegra-profiler/main.c
index 7a1f5c7b9973..e843ccb9f5f6 100644
--- a/drivers/misc/tegra-profiler/main.c
+++ b/drivers/misc/tegra-profiler/main.c
@@ -1,7 +1,7 @@
/*
* drivers/misc/tegra-profiler/main.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,
@@ -195,6 +195,8 @@ set_parameters(struct quadd_parameters *p, uid_t *debug_app_uid)
if (p->nr_pids != 1)
return -EINVAL;
+ p->package_name[sizeof(p->package_name) - 1] = '\0';
+
rcu_read_lock();
task = pid_task(find_vpid(p->pids[0]), PIDTYPE_PID);
rcu_read_unlock();
@@ -295,7 +297,9 @@ set_parameters(struct quadd_parameters *p, uid_t *debug_app_uid)
if (extra & QUADD_PARAM_EXTRA_BT_MIXED)
pr_info("unwinding: mixed mode\n");
- quadd_unwind_start(task);
+ err = quadd_unwind_start(task);
+ if (err)
+ return err;
pr_info("New parameters have been applied\n");