Skip to content
Snippets Groups Projects
Commit 86fc80f1 authored by Thomas Gleixner's avatar Thomas Gleixner Committed by James Morris
Browse files

capabilities: Use RCU to protect task lookup in sys_capget


cap_get_target_pid() protects the task lookup with tasklist_lock.
security_capget() is called under tasklist_lock as well but
tasklist_lock does not protect anything there. The capabilities are
protected by RCU already.

So tasklist_lock only protects the lookup and prevents the task going
away, which can be done with rcu_read_lock() as well.

Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Signed-off-by: default avatarJames Morris <jmorris@namei.org>
parent 67fa4880
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment