Re: the creation of boot_cpu_init() is wrong and accessing uninitialised data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2006-06-26 at 20:04 -0700, Andrew Morton wrote:
> I think arch code should do it before calling start_kernel(), really.
> It's
> just such a basic part of the kernel framework.

Hmm ... well, getting at current_thread_info()->cpu is possible, but
nasty to audit, I would have thought (given that we're in assembler
before start_kernel is called).

> A less wholesome but perhaps simpler solution would be to call the new
> setup_smp_processor_id() on entry to start_kernel().

I was wondering about simply replacing boot_cpu_init() with
smp_prepare_boot_cpu().  By and large they do the same thing on most
archs, and mostly they don't seem to depend on setup_arch() having been
called.

However, introducing setup_smp_processor_id() will also work ... I'll
see if I can do it in an easy way.

James


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux