Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1640989

[PATCH 1/4] ftrace: Simplify glob handling in unregister_ftrace_function_probe_func()

From "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com>
Newsgroups linux.kernel
Subject [PATCH 1/4] ftrace: Simplify glob handling in unregister_ftrace_function_probe_func()
Date 2017-05-13 21:40 +0200
Message-ID <tGL3s-7WF-25@gated-at.bofh.it> (permalink)
References <tGL3r-7WF-17@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Handle a NULL glob properly.

Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
---
 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 39dca4e86a94..28dc824ad072 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -4144,9 +4144,9 @@ unregister_ftrace_function_probe_func(char *glob, struct trace_array *tr,
 	int i, ret = -ENODEV;
 	int size;
 
-	if (glob && (strcmp(glob, "*") == 0 || !strlen(glob)))
+	if (!glob || (glob && (strcmp(glob, "*") == 0 || !strlen(glob))))
 		func_g.search = NULL;
-	else if (glob) {
+	else {
 		int not;
 
 		func_g.type = filter_parse_regex(glob, strlen(glob),
-- 
2.12.2

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/4] ftrace: Fix a few issues "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com> - 2017-05-13 21:40 +0200
  [PATCH 1/4] ftrace: Simplify glob handling in unregister_ftrace_function_probe_func() "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com> - 2017-05-13 21:40 +0200
    Re: [PATCH 1/4] ftrace: Simplify glob handling in  unregister_ftrace_function_probe_func() Steven Rostedt <rostedt@goodmis.org> - 2017-05-15 19:30 +0200
      Re: [PATCH 1/4] ftrace: Simplify glob handling in  unregister_ftrace_function_probe_func() "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com> - 2017-05-16 10:10 +0200
  [PATCH 3/4] selftests/ftrace: Fix bashisms "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com> - 2017-05-13 21:40 +0200
    Re: [PATCH 3/4] selftests/ftrace: Fix bashisms Steven Rostedt <rostedt@goodmis.org> - 2017-05-15 17:20 +0200
      Re: [PATCH 3/4] selftests/ftrace: Fix bashisms Masami Hiramatsu <masami.hiramatsu@gmail.com> - 2017-05-16 16:30 +0200

csiph-web