]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
common/Thread: Don't store pointer to thread_name
authorAdam C. Emerson <aemerson@redhat.com>
Tue, 7 Jul 2020 20:39:57 +0000 (16:39 -0400)
committerAdam C. Emerson <aemerson@redhat.com>
Wed, 9 Sep 2020 02:09:40 +0000 (22:09 -0400)
commit4cec019d5efabb340b9e8541dae58f33a2826c50
treef2eef451cd6184ba48896d67d1b4d8bc28fe84b5
parent2d4c9acc98bff8531a5204d4dd4dfced5a17756c
common/Thread: Don't store pointer to thread_name

Having Thread::create store a pointer to a string that is passed to
ceph_pthread_setname in Thread::entry_wrapper can lead to using a
pointer in the calling thread's stack that gets freed before use.

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
src/common/Thread.cc
src/common/Thread.h