lkml.org 
[lkml]   [2009]   [Jul]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC PATCH] kmemleak: Scan all thread stacks
From
Date
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?

Thanks.

--
Catalin



\
 
 \ /
  Last update: 2009-07-17 18:59    [from the cache]
©2003-2011 Jasper Spaans