Skip to content

Conversation

@rashchupkinr
Copy link

Thread creation during attach was correctly processed.
This commit adds processing of cases when some threads exit during attach without failing to patch. Threads are added to list only if they been correctly attached to.

}
} while (1);

pctx = kpatch_ptrace_ctx_alloc(proc);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In case of failure here you leave the thread attached but unaccounted. Please fix restore the allocations before the attachment.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved pctx allocation before SIGSTOP processing, but after successfull PTRACE_ATTACH.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants