aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/offchannel.c
diff options
context:
space:
mode:
authorSteffen Rumler <steffen.rumler.ext@nsn.com>2012-06-06 16:37:17 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-06-17 11:23:10 -0700
commit238607e0800c37b64868e6ec2323fc0e25cd7363 (patch)
tree3a0fea3c11a3bbda5ef5b142037b6da1e8cd50f0 /net/mac80211/offchannel.c
parent29684ecb7a675061933fb19531407fa9f9971ab4 (diff)
downloadkernel_samsung_smdk4412-238607e0800c37b64868e6ec2323fc0e25cd7363.zip
kernel_samsung_smdk4412-238607e0800c37b64868e6ec2323fc0e25cd7363.tar.gz
kernel_samsung_smdk4412-238607e0800c37b64868e6ec2323fc0e25cd7363.tar.bz2
powerpc: Fix kernel panic during kernel module load
commit 3c75296562f43e6fbc6cddd3de948a7b3e4e9bcf upstream. This fixes a problem which can causes kernel oopses while loading a kernel module. According to the PowerPC EABI specification, GPR r11 is assigned the dedicated function to point to the previous stack frame. In the powerpc-specific kernel module loader, do_plt_call() (in arch/powerpc/kernel/module_32.c), GPR r11 is also used to generate trampoline code. This combination crashes the kernel, in the case where the compiler chooses to use a helper function for saving GPRs on entry, and the module loader has placed the .init.text section far away from the .text section, meaning that it has to generate a trampoline for functions in the .init.text section to call the GPR save helper. Because the trampoline trashes r11, references to the stack frame using r11 can cause an oops. The fix just uses GPR r12 instead of GPR r11 for generating the trampoline code. According to the statements from Freescale, this is safe from an EABI perspective. I've tested the fix for kernel 2.6.33 on MPC8541. Signed-off-by: Steffen Rumler <steffen.rumler.ext@nsn.com> [paulus@samba.org: reworded the description] Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/mac80211/offchannel.c')
0 files changed, 0 insertions, 0 deletions