aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mm
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-03-03 14:54:39 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2013-03-03 14:54:39 -0500
commit529e5fbcd8d3cb48cf824ac8fde91cc80a9e985f (patch)
tree5b6792ea3fe35ba3a2900978b1679d5d0a8bbee3 /arch/arm/mm
parent686c09407d24123755ee05aae5be680be886a233 (diff)
parent16af43fef87512f7324205783526f543ddcf09cf (diff)
Merge branch 'for-linus' of git://git.linaro.org/people/rmk/linux-arm
Pull late ARM updates from Russell King: "Here is the late set of ARM updates for this merge window; in here is: - The ARM parts of the broadcast timer support, core parts merged through tglx's tree. This was left over from the previous merge to allow the dependency on tglx's tree to be resolved. - A fix to the VFP code which shows up on Raspberry Pi's, as well as fixing the fallout from a previous commit in this area. - A number of smaller fixes scattered throughout the ARM tree" * 'for-linus' of git://git.linaro.org/people/rmk/linux-arm: ARM: Fix broken commit 0cc41e4a21d43 corrupting kernel messages ARM: fix scheduling while atomic warning in alignment handling code ARM: VFP: fix emulation of second VFP instruction ARM: 7656/1: uImage: Error out on build of multiplatform without LOADADDR ARM: 7640/1: memory: tegra_ahb_enable_smmu() depends on TEGRA_IOMMU_SMMU ARM: 7654/1: Preserve L_PTE_VALID in pte_modify() ARM: 7653/2: do not scale loops_per_jiffy when using a constant delay clock ARM: 7651/1: remove unused smp_timer_broadcast #define
Diffstat (limited to 'arch/arm/mm')
-rw-r--r--arch/arm/mm/alignment.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/arch/arm/mm/alignment.c b/arch/arm/mm/alignment.c
index b820edaf3184..db26e2e543f4 100644
--- a/arch/arm/mm/alignment.c
+++ b/arch/arm/mm/alignment.c
@@ -749,7 +749,6 @@ do_alignment(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
749 unsigned long instr = 0, instrptr; 749 unsigned long instr = 0, instrptr;
750 int (*handler)(unsigned long addr, unsigned long instr, struct pt_regs *regs); 750 int (*handler)(unsigned long addr, unsigned long instr, struct pt_regs *regs);
751 unsigned int type; 751 unsigned int type;
752 mm_segment_t fs;
753 unsigned int fault; 752 unsigned int fault;
754 u16 tinstr = 0; 753 u16 tinstr = 0;
755 int isize = 4; 754 int isize = 4;
@@ -760,16 +759,15 @@ do_alignment(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
760 759
761 instrptr = instruction_pointer(regs); 760 instrptr = instruction_pointer(regs);
762 761
763 fs = get_fs();
764 set_fs(KERNEL_DS);
765 if (thumb_mode(regs)) { 762 if (thumb_mode(regs)) {
766 fault = __get_user(tinstr, (u16 *)(instrptr & ~1)); 763 u16 *ptr = (u16 *)(instrptr & ~1);
764 fault = probe_kernel_address(ptr, tinstr);
767 if (!fault) { 765 if (!fault) {
768 if (cpu_architecture() >= CPU_ARCH_ARMv7 && 766 if (cpu_architecture() >= CPU_ARCH_ARMv7 &&
769 IS_T32(tinstr)) { 767 IS_T32(tinstr)) {
770 /* Thumb-2 32-bit */ 768 /* Thumb-2 32-bit */
771 u16 tinst2 = 0; 769 u16 tinst2 = 0;
772 fault = __get_user(tinst2, (u16 *)(instrptr+2)); 770 fault = probe_kernel_address(ptr + 1, tinst2);
773 instr = (tinstr << 16) | tinst2; 771 instr = (tinstr << 16) | tinst2;
774 thumb2_32b = 1; 772 thumb2_32b = 1;
775 } else { 773 } else {
@@ -778,8 +776,7 @@ do_alignment(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
778 } 776 }
779 } 777 }
780 } else 778 } else
781 fault = __get_user(instr, (u32 *)instrptr); 779 fault = probe_kernel_address(instrptr, instr);
782 set_fs(fs);
783 780
784 if (fault) { 781 if (fault) {
785 type = TYPE_FAULT; 782 type = TYPE_FAULT;