VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   35 Branches   59 Tags
author: Oleg Nesterov <oleg@redhat.com> 2014-10-13 15:53:35 -0700 committer: Linus Torvalds <torvalds@linux-foundation.org> 2014-10-14 02:18:21 +0200 commit: b03023ecbdb76c1dec86b41ed80b123c22783220 parent: 1c3bea0e71892ef9100c01d3799cdae8cac273ef
Commit Summary:
coredump: add %i/%I in core_pattern to report the tid of the crashed thread
Diffstat:
1 file changed, 8 insertions, 0 deletions
diff --git a/fs/coredump.c b/fs/coredump.c
index a93f7e6ea4cf..b5c86ffd5033 100644
--- a/fs/coredump.c
+++ b/fs/coredump.c
@@ -199,6 +199,14 @@ static int format_corename(struct core_name *cn, struct coredump_params *cprm)
 				err = cn_printf(cn, "%d",
 					      task_tgid_nr(current));
 				break;
+			case 'i':
+				err = cn_printf(cn, "%d",
+					      task_pid_vnr(current));
+				break;
+			case 'I':
+				err = cn_printf(cn, "%d",
+					      task_pid_nr(current));
+				break;
 			/* uid */
 			case 'u':
 				err = cn_printf(cn, "%d", cred->uid);