lkml.org 
[lkml]   [2012]   [Nov]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] Yama: remove locking from delete path
From
Date
Kees Cook wrote:
> Instead of locking the list during a delete, mark entries as invalid
> and trigger a workqueue to clean them up. This lets us easily handle
> task_free from interrupt context.

> @@ -57,9 +80,12 @@ static int yama_ptracer_add(struct task_struct *tracer,
>
> added->tracee = tracee;
> added->tracer = tracer;
> + added->invalid = false;
>
> - spin_lock_bh(&ptracer_relations_lock);
> + spin_lock(&ptracer_relations_lock);

Can't you use
spin_lock_irqsave(&ptracer_relations_lock, flags);
spin_unlock_irqrestore(&ptracer_relations_lock, flags);
instead of adding ->invalid ?


\
 
 \ /
  Last update: 2012-11-20 14:01    [W:0.083 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site