]> git.baikalelectronics.ru Git - kernel.git/commit
apparmor: remove the "task" arg from may_change_ptraced_domain()
authorOleg Nesterov <oleg@redhat.com>
Tue, 8 Oct 2013 12:46:03 +0000 (05:46 -0700)
committerJohn Johansen <john.johansen@canonical.com>
Wed, 30 Oct 2013 04:34:18 +0000 (21:34 -0700)
commit91970d58cb4032bee35b46131b23a31f3806ca43
tree03c7edaa4b4e6b3d78528769202661ce4861a832
parentf3613bc8b580367ff991646ca8c28fdabdb28775
apparmor: remove the "task" arg from may_change_ptraced_domain()

Unless task == current ptrace_parent(task) is not safe even under
rcu_read_lock() and most of the current users are not right.

So may_change_ptraced_domain(task) looks wrong as well. However it
is always called with task == current so the code is actually fine.
Remove this argument to make this fact clear.

Note: perhaps we should simply kill ptrace_parent(), it buys almost
nothing. And it is obviously racy, perhaps this should be fixed.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
security/apparmor/domain.c