diff options
author | Steven Rostedt <srostedt@redhat.com> | 2011-12-19 19:07:36 -0500 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2014-01-03 04:33:36 +0000 |
commit | 195c821e74fc44042a86f9d7f101dc6f03a826b1 (patch) | |
tree | 586a28d889fe04f54f0aee55ff20b9b14c22446a /net/lapb/lapb_timer.c | |
parent | 4f02a39322708b815cd2f623632ce9ea19a955e1 (diff) |
ftrace: Create ftrace_hash_empty() helper routine
commit 06a51d9307380c78bb5c92e68fc80ad2c7d7f890 upstream.
There are two types of hashes in the ftrace_ops; one type
is the filter_hash and the other is the notrace_hash. Either
one may be null, meaning it has no elements. But when elements
are added, the hash is allocated.
Throughout the code, a check needs to be made to see if a hash
exists or the hash has elements, but the check if the hash exists
is usually missing causing the possible "NULL pointer dereference bug".
Add a helper routine called "ftrace_hash_empty()" that returns
true if the hash doesn't exist or its count is zero. As they mean
the same thing.
Last-bug-reported-by: Jiri Olsa <jolsa@redhat.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'net/lapb/lapb_timer.c')
0 files changed, 0 insertions, 0 deletions