[3.19.y-ckt stable] Patch "ftrace/scripts: Fix incorrect use of sprintf in recordmcount" has been added to the 3.19.y-ckt tree

Kamal Mostafa kamal at canonical.com
Wed Jan 20 01:04:21 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-3.19.y-queue branch of the 3.19.y-ckt extended stable tree 
which can be found at:

    http://kernel.ubuntu.com/git/ubuntu/linux.git/log/?h=linux-3.19.y-queue

This patch is scheduled to be released in version 3.19.8-ckt13.

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.19.y-ckt tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable

Thanks.
-Kamal

---8<------------------------------------------------------------

>From eee535997cc4d1d19d2e81b062d6fabfda139aee 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