[PATCH v1] kernel/events/core: check return value of task_function_call()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Check the return value of task_function_call(), which could be error
code when the execution fails.

Signed-off-by: Li Zhong <floridsleeves@xxxxxxxxx>
---
 kernel/events/core.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/kernel/events/core.c b/kernel/events/core.c
index 2621fd24ad26..ac0cf611b12a 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -13520,7 +13520,8 @@ static void perf_cgroup_attach(struct cgroup_taskset *tset)
 	struct cgroup_subsys_state *css;
 
 	cgroup_taskset_for_each(task, css, tset)
-		task_function_call(task, __perf_cgroup_move, task);
+		if (!task_function_call(task, __perf_cgroup_move, task))
+			return;
 }
 
 struct cgroup_subsys perf_event_cgrp_subsys = {
-- 
2.25.1




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux