projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
441dae8
)
ftrace: Unlock hash mutex on failed allocation in process_mod_list()
author
Steven Rostedt (VMware)
<rostedt@goodmis.org>
Wed, 28 Jun 2017 13:09:38 +0000
(09:09 -0400)
committer
Steven Rostedt (VMware)
<rostedt@goodmis.org>
Wed, 28 Jun 2017 13:09:38 +0000
(09:09 -0400)
If the new_hash fails to allocate, then unlock the hash mutex on error.
Reported-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
kernel/trace/ftrace.c
patch
|
blob
|
history
diff --git
a/kernel/trace/ftrace.c
b/kernel/trace/ftrace.c
index 7509ef9810bf89aeb118527e8e67c87966816842..2c79630cd267412f118832797b0f463eaa346a81 100644
(file)
--- a/
kernel/trace/ftrace.c
+++ b/
kernel/trace/ftrace.c
@@
-3997,7
+3997,7
@@
static void process_mod_list(struct list_head *head, struct ftrace_ops *ops,
new_hash = alloc_and_copy_ftrace_hash(FTRACE_HASH_DEFAULT_BITS,
*orig_hash);
if (!new_hash)
-
return; /* W
arn? */
+
goto out; /* w
arn? */
mutex_lock(&ftrace_lock);
@@
-4042,6
+4042,7
@@
static void process_mod_list(struct list_head *head, struct ftrace_ops *ops,
new_hash, enable);
mutex_unlock(&ftrace_lock);
+ out:
mutex_unlock(&ops->func_hash->regex_lock);
free_ftrace_hash(new_hash);