Skip to content
Snippets Groups Projects
Commit 18f661bc authored by Stephen Wilson's avatar Stephen Wilson Committed by Al Viro
Browse files

proc: hold cred_guard_mutex in check_mem_permission()


Avoid a potential race when task exec's and we get a new ->mm but check against
the old credentials in ptrace_may_access().

Holding of the mutex is implemented by factoring out the body of the code into a
helper function __check_mem_permission().  Performing this factorization now
simplifies upcoming changes and minimizes churn in the diff's.

Signed-off-by: default avatarStephen Wilson <wilsons@start.ca>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 26947f8c
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment