Re: [tip:perf/urgent] ftrace: Fix strncpy() use, use strlcpy() instead of strncpy()
On 2013年04月08日 23:31, tip-bot for Chen Gang wrote: > Commit-ID: 75761cc15877c155b3849b4e0e0cb3f897faf471 > Gitweb: http://git.kernel.org/tip/75761cc15877c155b3849b4e0e0cb3f897faf471 > Author: Chen Gang > AuthorDate: Mon, 8 Apr 2013 12:12:39 +0800 > Committer: Ingo Molnar > CommitDate: Mon, 8 Apr 2013 13:26:56 +0200 > > ftrace: Fix strncpy() use, use strlcpy() instead of strncpy() > > For NUL terminated string we always need to set '\0' at the end. > > Signed-off-by: Chen Gang > Cc: rost...@goodmis.org > Cc: Frederic Weisbecker > Link: http://lkml.kernel.org/r/516243b7.9020...@asianux.com > Signed-off-by: Ingo Molnar > --- thank you very much for applying the 3 related patches. -- Chen Gang Asianux Corporation -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[tip:perf/urgent] ftrace: Fix strncpy() use, use strlcpy() instead of strncpy()
Commit-ID: 75761cc15877c155b3849b4e0e0cb3f897faf471 Gitweb: http://git.kernel.org/tip/75761cc15877c155b3849b4e0e0cb3f897faf471 Author: Chen Gang AuthorDate: Mon, 8 Apr 2013 12:12:39 +0800 Committer: Ingo Molnar CommitDate: Mon, 8 Apr 2013 13:26:56 +0200 ftrace: Fix strncpy() use, use strlcpy() instead of strncpy() For NUL terminated string we always need to set '\0' at the end. Signed-off-by: Chen Gang Cc: rost...@goodmis.org Cc: Frederic Weisbecker Link: http://lkml.kernel.org/r/516243b7.9020...@asianux.com Signed-off-by: Ingo Molnar --- kernel/trace/ftrace.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index 6893d5a..db14374 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c @@ -3441,14 +3441,14 @@ static char ftrace_filter_buf[FTRACE_FILTER_SIZE] __initdata; static int __init set_ftrace_notrace(char *str) { - strncpy(ftrace_notrace_buf, str, FTRACE_FILTER_SIZE); + strlcpy(ftrace_notrace_buf, str, FTRACE_FILTER_SIZE); return 1; } __setup("ftrace_notrace=", set_ftrace_notrace); static int __init set_ftrace_filter(char *str) { - strncpy(ftrace_filter_buf, str, FTRACE_FILTER_SIZE); + strlcpy(ftrace_filter_buf, str, FTRACE_FILTER_SIZE); return 1; } __setup("ftrace_filter=", set_ftrace_filter); -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[tip:perf/urgent] ftrace: Fix strncpy() use, use strlcpy() instead of strncpy()
Commit-ID: 75761cc15877c155b3849b4e0e0cb3f897faf471 Gitweb: http://git.kernel.org/tip/75761cc15877c155b3849b4e0e0cb3f897faf471 Author: Chen Gang gang.c...@asianux.com AuthorDate: Mon, 8 Apr 2013 12:12:39 +0800 Committer: Ingo Molnar mi...@kernel.org CommitDate: Mon, 8 Apr 2013 13:26:56 +0200 ftrace: Fix strncpy() use, use strlcpy() instead of strncpy() For NUL terminated string we always need to set '\0' at the end. Signed-off-by: Chen Gang gang.c...@asianux.com Cc: rost...@goodmis.org Cc: Frederic Weisbecker fweis...@gmail.com Link: http://lkml.kernel.org/r/516243b7.9020...@asianux.com Signed-off-by: Ingo Molnar mi...@kernel.org --- kernel/trace/ftrace.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index 6893d5a..db14374 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c @@ -3441,14 +3441,14 @@ static char ftrace_filter_buf[FTRACE_FILTER_SIZE] __initdata; static int __init set_ftrace_notrace(char *str) { - strncpy(ftrace_notrace_buf, str, FTRACE_FILTER_SIZE); + strlcpy(ftrace_notrace_buf, str, FTRACE_FILTER_SIZE); return 1; } __setup(ftrace_notrace=, set_ftrace_notrace); static int __init set_ftrace_filter(char *str) { - strncpy(ftrace_filter_buf, str, FTRACE_FILTER_SIZE); + strlcpy(ftrace_filter_buf, str, FTRACE_FILTER_SIZE); return 1; } __setup(ftrace_filter=, set_ftrace_filter); -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [tip:perf/urgent] ftrace: Fix strncpy() use, use strlcpy() instead of strncpy()
On 2013年04月08日 23:31, tip-bot for Chen Gang wrote: Commit-ID: 75761cc15877c155b3849b4e0e0cb3f897faf471 Gitweb: http://git.kernel.org/tip/75761cc15877c155b3849b4e0e0cb3f897faf471 Author: Chen Gang gang.c...@asianux.com AuthorDate: Mon, 8 Apr 2013 12:12:39 +0800 Committer: Ingo Molnar mi...@kernel.org CommitDate: Mon, 8 Apr 2013 13:26:56 +0200 ftrace: Fix strncpy() use, use strlcpy() instead of strncpy() For NUL terminated string we always need to set '\0' at the end. Signed-off-by: Chen Gang gang.c...@asianux.com Cc: rost...@goodmis.org Cc: Frederic Weisbecker fweis...@gmail.com Link: http://lkml.kernel.org/r/516243b7.9020...@asianux.com Signed-off-by: Ingo Molnar mi...@kernel.org --- thank you very much for applying the 3 related patches. -- Chen Gang Asianux Corporation -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/