summaryrefslogtreecommitdiff
path: root/Kconfig
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2015-12-11 19:11:23 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2015-12-14 12:08:55 -0300
commitabd828688407eb86044f1bc9e5133c55d7597596 (patch)
treeb42146c0c9ffa8dc7cd3643af4e021b5a4f4d1b8 /Kconfig
parentb6847d2c2a50e96680e233ce4b2784981b6f309e (diff)
downloadlinux-abd828688407eb86044f1bc9e5133c55d7597596.tar.gz
perf thread: Fix reference count initial state
We should always return from thread__new(), the constructor, with the object with a reference count of one, so that: struct thread *thread = thread__new(); thread__put(thread); Will call thread__delete(). If any reference is made to that 'thread' variable, it better use thread__get(thread) to hold a reference. We were returning with thread->refcnt set to zero, fix it and some cases where thread__delete() was being called, which were not a problem because just one reference was being used, now that we set it to 1, use thread__put() instead. Reported-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Wang Nan <wangnan0@huawei.com> Link: http://lkml.kernel.org/n/tip-4b9mkuk66to4ecckpmpvqx6s@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'Kconfig')
0 files changed, 0 insertions, 0 deletions