lkml.org 
[lkml]   [2007]   [Mar]   [1]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateThu, 1 Mar 2007 00:17:08 -0800
FromAndrew Morton <>
SubjectRe: Thread flags modified without set_thread_flag() (non atomically)
On Wed, 28 Feb 2007 22:23:41 -0800 (PST) David Miller <davem@davemloft.net> wrote:

> > That all looks rather deliberate.
> > 
> > > powerpc/kernel/process.c:               t->flags ^= (_TIF_ABI_PENDING | 
> > > _TIF_32BIT);
> > >
> > > ia64/kernel/mca.c:      ti->flags = _TIF_MCA_INIT;
> > >
> > > avr32/kernel/ptrace.c:          ti->flags |= _TIF_BREAKPOINT;
> > 
> > No, I don't immediately see anything in the flush_old_exec() code path
> > which tells us that nobody else can look up this thread_info (or be holding
> > a ref to it) in this context.
> 
> Provide the counter example, what other threads of control can modify
> relevant flags while a thread is exec()'ing?  It's essentially frozen
> outside of these code paths, otherwise we wouldn't be able to make all
> of these modifications to the task state.

As Mathieu points out, resched_task(), perhaps.  It can be called from interrupt.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-03-01 09:19    [from the cache]
©2003-2008