[4.2.y-ckt stable] Patch "ftrace/scripts: Fix incorrect use of sprintf in recordmcount" has been added to the 4.2.y-ckt tree
Kamal Mostafa
kamal at canonical.com
Fri Jan 15 23:58:26 UTC 2016
This is a note to let you know that I have just added a patch titled
ftrace/scripts: Fix incorrect use of sprintf in recordmcount
to the linux-4.2.y-queue branch of the 4.2.y-ckt extended stable tree
which can be found at:
http://kernel.ubuntu.com/git/ubuntu/linux.git/log/?h=linux-4.2.y-queue
This patch is scheduled to be released in version 4.2.8-ckt2.
If you, or anyone else, feels it should not be added to this tree, please
reply to this email.
For more information about the 4.2.y-ckt tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable
Thanks.
-Kamal
---8<------------------------------------------------------------
>From eb8345ddbd1fe4d9488ee1a9aba6b6d70cce4ee5 Mon Sep 17 00:00:00 2001
From: Colin Ian King <colin.king at canonical.com>
Date: Wed, 30 Dec 2015 23:06:41 +0000
Subject: ftrace/scripts: Fix incorrect use of sprintf in recordmcount
commit 713a3e4de707fab49d5aa4bceb77db1058572a7b upstream.
Fix build warning:
scripts/recordmcount.c:589:4: warning: format not a string
literal and no format arguments [-Wformat-security]
sprintf("%s: failed\n", file);
Fixes: a50bd43935586 ("ftrace/scripts: Have recordmcount copy the object file")
Link: http://lkml.kernel.org/r/1451516801-16951-1-git-send-email-colin.king@canonical.com
Cc: Li Bin <huawei.libin at huawei.com>
Cc: Russell King <rmk+kernel at arm.linux.org.uk>
Cc: Will Deacon <will.deacon at arm.com>
Signed-off-by: Colin Ian King <colin.king at canonical.com>
Signed-off-by: Steven Rostedt <rostedt at goodmis.org>
Signed-off-by: Kamal Mostafa <kamal at canonical.com>
---
scripts/recordmcount.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/recordmcount.c b/scripts/recordmcount.c
index a3d96c2..825d717 100644
--- a/scripts/recordmcount.c
+++ b/scripts/recordmcount.c
@@ -584,7 +584,7 @@ main(int argc, char *argv[])
do_file(file);
break;
case SJ_FAIL: /* error in do_file or below */
- sprintf("%s: failed\n", file);
+ fprintf(stderr, "%s: failed\n", file);
++n_error;
break;
case SJ_SUCCEED: /* premature success */
--
1.9.1
More information about the kernel-team
mailing list