Patch "tracing: Remove extra space at the end of hwlat_detector/mode" has been added to the 6.4-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

    tracing: Remove extra space at the end of hwlat_detector/mode

to the 6.4-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:
     tracing-remove-extra-space-at-the-end-of-hwlat_detec.patch
and it can be found in the queue-6.4 subdirectory.

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



commit 48e98fcda3e7346a0ba10e840e3e8bb809730c4e
Author: Mikhail Kobuk <m.kobuk@xxxxxxxxx>
Date:   Fri Aug 25 13:34:30 2023 +0300

    tracing: Remove extra space at the end of hwlat_detector/mode
    
    [ Upstream commit 2cf0dee989a8b2501929eaab29473b6b1fa11057 ]
    
    Space is printed after each mode value including the last one:
    $ echo \"$(sudo cat /sys/kernel/tracing/hwlat_detector/mode)\"
    "none [round-robin] per-cpu "
    
    Found by Linux Verification Center (linuxtesting.org) with SVACE.
    
    Link: https://lore.kernel.org/linux-trace-kernel/20230825103432.7750-1-m.kobuk@xxxxxxxxx
    
    Cc: Masami Hiramatsu <mhiramat@xxxxxxxxxx>
    Fixes: 8fa826b7344d ("trace/hwlat: Implement the mode config option")
    Signed-off-by: Mikhail Kobuk <m.kobuk@xxxxxxxxx>
    Reviewed-by: Alexey Khoroshilov <khoroshilov@xxxxxxxxx>
    Acked-by: Daniel Bristot de Oliveira <bristot@xxxxxxxxxx>
    Signed-off-by: Steven Rostedt (Google) <rostedt@xxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/kernel/trace/trace_hwlat.c b/kernel/trace/trace_hwlat.c
index 2f37a6e68aa9f..b791524a6536a 100644
--- a/kernel/trace/trace_hwlat.c
+++ b/kernel/trace/trace_hwlat.c
@@ -635,7 +635,7 @@ static int s_mode_show(struct seq_file *s, void *v)
 	else
 		seq_printf(s, "%s", thread_mode_str[mode]);
 
-	if (mode != MODE_MAX)
+	if (mode < MODE_MAX - 1) /* if mode is any but last */
 		seq_puts(s, " ");
 
 	return 0;



[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