]> git.baikalelectronics.ru Git - kernel.git/commit
pop previous section in alternative.c
authorSteven Rostedt <rostedt@goodmis.org>
Wed, 9 Apr 2008 23:04:07 +0000 (19:04 -0400)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 10 Apr 2008 01:38:08 +0000 (18:38 -0700)
commitd4395f845f31582ed2b8ee9863ff7564ef286a68
treecb2e3ce144808fff867d043c58117f30cdf4c1f9
parent3e3a81ce8f90b15a3bc5fe69b977ddc143621d21
pop previous section in alternative.c

gcc expects all toplevel assembly to return to the original section type.
The code in alteranative.c does not do this. This caused some strange bugs
in sched-devel where code would end up in the .rodata section and when
the kernel sets the NX bit on all .rodata, the kernel would crash when
executing this code.

This patch adds a .previous marker to return the code back to the
original section.

Credit goes to Andrew Pinski for telling me it wasn't a gcc bug but a
bug in the toplevel asm code in the kernel.  ;-)

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/x86/kernel/alternative.c