On Fri, Mar 4, 2022 at 5:35 PM Miaohe Lin <linmiaohe@xxxxxxxxxx> wrote: > > rcu_read_lock is required by grabbing the task refcount but it's not > needed for ptrace_may_access. So we could release the rcu lock after > task refcount is successfully grabbed to reduce the rcu holding time. > > Signed-off-by: Miaohe Lin <linmiaohe@xxxxxxxxxx> Also simple. Reviewed-by: Muchun Song <songmuchun@xxxxxxxxxxxxx>