lkml.org 
[lkml]   [2009]   [Jul]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH] kmemleak: Scan all thread stacks
On Fri, Jul 17, 2009 at 07:01:09PM +0200, Peter Zijlstra wrote:
> On Fri, 2009-07-17 at 17:57 +0100, Catalin Marinas wrote:
> > On Fri, 2009-07-17 at 18:43 +0200, Ingo Molnar wrote:
> > > * Catalin Marinas <catalin.marinas@arm.com> wrote:
> > > > 2. Is it safe to use rcu_read_lock() and task_lock() when scanning the
> > > > corresponding kernel stack (thread_info structure)? The loop doesn't
> > > > do any modification to the task list. The reason for this is to
> > > > allow kernel preemption when scanning the stacks.
> > >
> > > you cannot generally preempt while holding the RCU read-lock.
> >
> > This may work with rcupreempt enabled. But, with classic RCU is it safe
> > to call schedule (or cond_resched) while holding the RCU read-lock?
>
> No.

What Peter said! ;-)

However, you might be able to use SRCU (http://lwn.net/Articles/202847/),
which does allow blocking within read-side critical sections.

Thanx, Paul


\
 
 \ /
  Last update: 2009-07-22 18:21    [W:0.103 / U:5.216 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site