diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2019-07-04 17:13:46 +0200 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2019-07-09 15:13:27 +0200 |
commit | e56fbc9dc79ce0fdc49ffadd062214ddd02f65b6 (patch) | |
tree | b108e9b4fcb4cc1be29778253097089884b00f23 /tools/perf/util/probe-event.c | |
parent | perf tools: Use zfree() where applicable (diff) | |
download | linux-e56fbc9dc79ce0fdc49ffadd062214ddd02f65b6.tar.xz linux-e56fbc9dc79ce0fdc49ffadd062214ddd02f65b6.zip |
perf tools: Use list_del_init() more thorougly
To allow for destructors to check if they're operating on a object still
in a list, and to avoid going from use after free list entries into
still valid, or even also other already removed from list entries.
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lkml.kernel.org/n/tip-deh17ub44atyox3j90e6rksu@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/probe-event.c')
-rw-r--r-- | tools/perf/util/probe-event.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c index 0a57b316c4dd..0c3b55d0617d 100644 --- a/tools/perf/util/probe-event.c +++ b/tools/perf/util/probe-event.c @@ -2333,7 +2333,7 @@ static void kprobe_blacklist__delete(struct list_head *blacklist) while (!list_empty(blacklist)) { node = list_first_entry(blacklist, struct kprobe_blacklist_node, list); - list_del(&node->list); + list_del_init(&node->list); zfree(&node->symbol); free(node); } |