Patch "lib/bootconfig: Fix to remove tailing spaces after value" has been added to the 5.8-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    lib/bootconfig: Fix to remove tailing spaces after value

to the 5.8-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     lib-bootconfig-fix-to-remove-tailing-spaces-after-value.patch
and it can be found in the queue-5.8 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From c7af4ecdffe1537ba8aeed0ac12c3326f908df43 Mon Sep 17 00:00:00 2001
From: Masami Hiramatsu <mhiramat@xxxxxxxxxx>
Date: Mon, 21 Sep 2020 18:44:51 +0900
Subject: lib/bootconfig: Fix to remove tailing spaces after value

From: Masami Hiramatsu <mhiramat@xxxxxxxxxx>

commit c7af4ecdffe1537ba8aeed0ac12c3326f908df43 upstream.

Fix to remove tailing spaces after value. If there is a space
after value, the bootconfig failed to remove it because it
applies strim() before replacing the delimiter with null.

For example,

foo = var    # comment

was parsed as below.

foo="var    "

but user will expect

foo="var"

This fixes it by applying strim() after removing the delimiter.

Link: https://lkml.kernel.org/r/160068149134.1088739.8868306567670058853.stgit@devnote2

Fixes: 76db5a27a827 ("bootconfig: Add Extra Boot Config support")
Cc: Ingo Molnar <mingo@xxxxxxxxxx>
Cc: stable@xxxxxxxxxxxxxxx
Signed-off-by: Masami Hiramatsu <mhiramat@xxxxxxxxxx>
Signed-off-by: Steven Rostedt (VMware) <rostedt@xxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

---
 lib/bootconfig.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/lib/bootconfig.c
+++ b/lib/bootconfig.c
@@ -486,8 +486,8 @@ static int __init __xbc_parse_value(char
 			break;
 		}
 		if (strchr(",;\n#}", c)) {
-			v = strim(v);
 			*p++ = '\0';
+			v = strim(v);
 			break;
 		}
 	}


Patches currently in stable-queue which might be from mhiramat@xxxxxxxxxx are

queue-5.8/kprobes-tracing-kprobes-fix-to-kill-kprobes-on-initmem-after-boot.patch
queue-5.8/lib-bootconfig-fix-to-remove-tailing-spaces-after-value.patch
queue-5.8/kprobes-fix-to-check-probe-enabled-before-disarm_kprobe_ftrace.patch
queue-5.8/lib-bootconfig-fix-a-bug-of-breaking-existing-tree-nodes.patch



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux