public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/2] coredump: use task comm instead of (unknown)
@ 2011-06-07 14:30 Jiri Slaby
  2011-06-07 14:30 ` [PATCH v2 2/2] coredump: escape / in hostname and comm Jiri Slaby
  2011-06-07 18:16 ` [PATCH v2 1/2] coredump: use task comm instead of (unknown) Oleg Nesterov
  0 siblings, 2 replies; 9+ messages in thread
From: Jiri Slaby @ 2011-06-07 14:30 UTC (permalink / raw)
  To: akpm
  Cc: linux-kernel, jirislaby, Jiri Slaby, Alan Cox, Al Viro,
	Andi Kleen, Oleg Nesterov

If we don't know the file corresponding to the binary (i.e. exe_file
is unknown), use "task->comm (path unknown)" instead of simple
"(unknown)" as suggested by ak.

The fallback is the same as %e except it will append "(path unknown)".

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Oleg Nesterov <oleg@redhat.com>
---
 fs/exec.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/exec.c b/fs/exec.c
index a9f2b36..2093c47 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -1631,7 +1631,7 @@ static int cn_print_exe_file(struct core_name *cn)
 
 	exe_file = get_mm_exe_file(current->mm);
 	if (!exe_file)
-		return cn_printf(cn, "(unknown)");
+		return cn_printf(cn, "%s (path unknown)", current->comm);
 
 	pathbuf = kmalloc(PATH_MAX, GFP_TEMPORARY);
 	if (!pathbuf) {
-- 
1.7.5.3



^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2011-08-30 15:21 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-07 14:30 [PATCH v2 1/2] coredump: use task comm instead of (unknown) Jiri Slaby
2011-06-07 14:30 ` [PATCH v2 2/2] coredump: escape / in hostname and comm Jiri Slaby
2011-08-30 15:21   ` Earl Chew
2011-06-07 18:16 ` [PATCH v2 1/2] coredump: use task comm instead of (unknown) Oleg Nesterov
2011-06-07 18:30   ` Jiri Slaby
2011-06-08 19:26     ` Oleg Nesterov
2011-06-07 18:35   ` [PATCH] do_coredump: fix the "ispipe" error check Oleg Nesterov
2011-06-07 19:00     ` Jiri Slaby
2011-06-07 19:07     ` Neil Horman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox