Skip to content

Commit

Permalink
coredump: use task comm instead of (unknown)
Browse files Browse the repository at this point in the history
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 <[email protected]>
Cc: Alan Cox <[email protected]>
Cc: Al Viro <[email protected]>
Cc: Andi Kleen <[email protected]>
Cc: Oleg Nesterov <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Jiri Slaby authored and torvalds committed Jul 26, 2011
1 parent 0e9a6cb commit 3141c8b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -1657,7 +1657,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) {
Expand Down

0 comments on commit 3141c8b

Please sign in to comment.