Re: [PATCH] Alternative fix for kprobes&DEBUG_RODATA was Re: [1/2] 2.6.22-rc5: known regressions with patches

Linus Torvalds
2007-06-21T16:05:23Z

On Thu, 21 Jun 2007, Andi Kleen wrote:

> Ok, here's a patch to do this. With that 55181000cd60334fe920c65ffbcdfe0e3f1de406
> should be reverted because it isn't needed anymore.

This seems buggy:

> + int notext = 0;
>
> +#ifdef CONFIG_KPROBES
> + notext = 1;
> +#endif
> #ifdef CONFIG_HOTPLUG_CPU
> /* It must still be possible to apply SMP alternatives. */
> - if (num_possible_cpus() <= 1)
> + notext = (num_possible_cpus() > 1);
> #endif

The CONFIG_HOTPLUG_CPU case will overwrite the CONFIG_KPROBES, and turn it
back to zero for a single CPU.

Linus