lkml.org 
[lkml]   [2009]   [Feb]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 3/4] kthreads: rework kthread_stop()
Date
On Thursday 05 February 2009 02:29:35 Eric W. Biederman wrote:
> Rusty Russell <rusty@rustcorp.com.au> writes:
> > Clever? Sure. Neat? Yes.
> >
> > But you are using a definition of obvious with which I was not previously
> > familiar :)
...
> Now Rusty I don't know about you but after I learned to do
> addition and subtraction it has always been obvious to me that
> one is the opposite of the other.

It is *not* obvious that the offset must be constant across all kthreads. On
all architectures, and always will be. That noone will *ever* put a
variable-size object on the stack in this code path.

I *think* it's true, but I've been surprised before.

> I am slightly concerned that using task_stack_page(tsk) may be
> overly clever, but compared to ACCESS_ONCE(), memory barriers,
> or not letting kthread_stop be called on a thread that may exit
> I think I am ahead of the game.

Absolutely agreed. Just humor me please and put a BUG_ON in there :)

Thanks,
Rusty.


\
 
 \ /
  Last update: 2009-02-05 02:07    [W:0.814 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site