Re: 2.6.8-rc4-mm1

William Lee Irwin III
2004-08-10T23:19:11Z

On Tue, Aug 10, 2004 at 06:39:33PM -0400, Robert Picco wrote:
> copy_thread expects a switch_stack below pt_regs on the stack. the
> switch_stack would have the parent's bspstore value for computing how
> much register backing store to copy into child. there isn't a
> switch_stack and the resultant bspstore size computed is enormous
> (depends on what there is on stack). i suspect printk has changed stack
> and the code layout changed too.
[...]
> * For SMP idle threads, fork_by_hand() calls do_fork with
> * NULL regs.
> */
> - if (!regs)
> + if (clone_flags & CLONE_IDLETASK)
> return 0;
> #endif

It may not be immediately obvious, but since all the checks for
CLONE_IDLETASK were ripped out in patches prior to this, respecting
CLONE_IDLETASK anywhere means that userspace can create idle threads(!).
So the alternative fixes I've been posting are very necessary.

-- wli