]> Pileus Git - ~andy/linux/blobdiff - security/apparmor/domain.c
Merge branch 'sh-latest' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal...
[~andy/linux] / security / apparmor / domain.c
index 7312bf9f7afcb6e6c8f96b68d600b0675f2ee146..c1e18ba5bdc09c65d259ad4bd9f374ef04dffd2f 100644 (file)
@@ -73,7 +73,6 @@ static int may_change_ptraced_domain(struct task_struct *task,
                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);