Skip to content

Commit 9f177fd

Browse files
olsajiriacmel
authored andcommitted
perf daemon: Return from kill functions
We should return correctly and warn in both daemon_session__kill() and daemon__kill() after we tried everything to kill sessions. The current code will keep on looping and waiting. Signed-off-by: Jiri Olsa <[email protected]> Cc: Alexander Shishkin <[email protected]> Cc: Ian Rogers <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Michael Petlan <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Peter Zijlstra <[email protected]> Link: http://lore.kernel.org/lkml/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent 1833b64 commit 9f177fd

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tools/perf/builtin-daemon.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -908,7 +908,9 @@ static void daemon_session__kill(struct daemon_session *session,
908908
daemon_session__signal(session, SIGKILL);
909909
break;
910910
default:
911-
break;
911+
pr_err("failed to wait for session %s\n",
912+
session->name);
913+
return;
912914
}
913915
how++;
914916

@@ -961,7 +963,8 @@ static void daemon__kill(struct daemon *daemon)
961963
daemon__signal(daemon, SIGKILL);
962964
break;
963965
default:
964-
break;
966+
pr_err("failed to wait for sessions\n");
967+
return;
965968
}
966969
how++;
967970

0 commit comments

Comments
 (0)