VisionFive2 Linux kernel

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

More than 9999 Commits   32 Branches   54 Tags
author: Menglong Dong <dong.menglong@zte.com.cn> 2020-12-05 22:14:42 -0800 committer: Linus Torvalds <torvalds@linux-foundation.org> 2020-12-06 10:19:07 -0800 commit: 2bf509d96d84c3336d08375e8af34d1b85ee71c8 parent: 11fb479ff5d9872ddff02dd533c16d60372c86b2
Commit Summary:
coredump: fix core_pattern parse error
Diffstat:
1 file changed, 2 insertions, 1 deletion
diff --git a/fs/coredump.c b/fs/coredump.c
index 0cd9056d79cc..c6acfc694f65 100644
--- a/fs/coredump.c
+++ b/fs/coredump.c
@@ -229,7 +229,8 @@ static int format_corename(struct core_name *cn, struct coredump_params *cprm,
 		 */
 		if (ispipe) {
 			if (isspace(*pat_ptr)) {
-				was_space = true;
+				if (cn->used != 0)
+					was_space = true;
 				pat_ptr++;
 				continue;
 			} else if (was_space) {