Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755736AbbBPSx0 (ORCPT ); Mon, 16 Feb 2015 13:53:26 -0500 Received: from mx1.redhat.com ([209.132.183.28]:51024 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755410AbbBPSxZ (ORCPT ); Mon, 16 Feb 2015 13:53:25 -0500 From: Josh Poimboeuf To: Andrew Morton , Ingo Molnar , Peter Zijlstra Cc: Jiri Kosina , Seth Jennings , linux-kernel@vger.kernel.org Subject: [PATCH 3/3] proc: fix /proc//stack for running tasks Date: Mon, 16 Feb 2015 12:52:36 -0600 Message-Id: <141f750fd50cba5fb94cf4649dd7517c3d569744.1424109806.git.jpoimboe@redhat.com> In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 983 Lines: 30 Reading /proc//stack for a running task can show garbage. Use the new safe version of the stack saving interface. For running tasks (other than current) it won't show anything. Signed-off-by: Josh Poimboeuf --- fs/proc/base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/proc/base.c b/fs/proc/base.c index 3f3d7ae..4c3f5d5 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c @@ -288,7 +288,7 @@ static int proc_pid_stack(struct seq_file *m, struct pid_namespace *ns, err = lock_trace(task); if (!err) { - save_stack_trace_tsk(task, &trace); + save_stack_trace_tsk_safe(task, &trace); for (i = 0; i < trace.nr_entries; i++) { seq_printf(m, "[<%pK>] %pS\n", -- 2.1.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/