Skip to content

Commit

Permalink
stop madvise thread when finished
Browse files Browse the repository at this point in the history
  • Loading branch information
f0k committed Jan 10, 2021
1 parent e4398ca commit de5c9a2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions dirtycow.c
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,8 @@ static void exploit(struct mem_arg *mem_arg)
pthread_create(&pth1, NULL, madviseThread, mem_arg);
ptrace(PTRACE_TRACEME);
kill(getpid(),SIGSTOP);
// we're done, tell madviseThread to stop and wait for it
mem_arg->stop = 1;
pthread_join(pth1, NULL);
}
} else {
Expand Down

0 comments on commit de5c9a2

Please sign in to comment.