]> Pileus Git - ~andy/linux/blobdiff - security/apparmor/domain.c
Merge branch 'upstream/xen-tracing2' of git://git.kernel.org/pub/scm/linux/kernel...
[~andy/linux] / security / apparmor / domain.c
index c825c6e0b636ee985283d3d4a077deaa24343808..c1e18ba5bdc09c65d259ad4bd9f374ef04dffd2f 100644 (file)
@@ -67,13 +67,12 @@ static int may_change_ptraced_domain(struct task_struct *task,
        int error = 0;
 
        rcu_read_lock();
-       tracer = tracehook_tracer_task(task);
+       tracer = ptrace_parent(task);
        if (tracer) {
                /* released below */
                cred = get_task_cred(tracer);
                tracerp = aa_cred_profile(cred);
        }
-       rcu_read_unlock();
 
        /* not ptraced */
        if (!tracer || unconfined(tracerp))
@@ -82,6 +81,7 @@ static int may_change_ptraced_domain(struct task_struct *task,
        error = aa_may_ptrace(tracer, tracerp, to_profile, PTRACE_MODE_ATTACH);
 
 out:
+       rcu_read_unlock();
        if (cred)
                put_cred(cred);