Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

common: set thread name from correct thread #7845

Merged
merged 1 commit into from Mar 7, 2016

Conversation

aiicore
Copy link
Contributor

@aiicore aiicore commented Feb 29, 2016

When using setuid/setgid, main thread don't have access to
/proc/self/task/[tid]/comm, which is owned by newly created
thread (root).

To fix this, pthread_setname_np() was moved to newly created
thread, and now it changes name for itself.

Signed-off-by: Igor Podoski igor.podoski@ts.fujitsu.com

When using setuid/setgid, main thread don't have access to
/proc/self/task/[tid]/comm, which is owned by newly created
thread (root).

To fix this, pthread_setname_np() was moved to newly created
thread, and now it changes name for itself.

Signed-off-by: Igor Podoski <igor.podoski@ts.fujitsu.com>
@liewegas liewegas changed the title Bugfix: set thread name will fail, when running as differnt user. common: set thread name from correct thread Mar 7, 2016
liewegas added a commit that referenced this pull request Mar 7, 2016
common: set thread name from correct thread

Reviewed-by: Sage Weil <sage@redhat.com>
@liewegas liewegas merged commit b62add0 into ceph:master Mar 7, 2016
@aiicore aiicore deleted the pthread_setname_fix branch March 8, 2016 06:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants