Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 3 Jul 2015 19:28:30 +0000 (12:28 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 3 Jul 2015 19:28:30 +0000 (12:28 -0700)
Pull arm64 fixes (and cleanups) from Catalin Marinas:
 "Various arm64 fixes:

   - suspicious RCU usage warning
   - BPF (out of bounds array read and endianness conversion)
   - perf (of_node usage after of_node_put, cpu_pmu->plat_device
     assignment)
   - huge pmd/pud check for value 0
   - rate-limiting should only take unhandled signals into account

  Clean-up:

   - incorrect use of pgprot_t type
   - unused header include
   - __init annotation to arm_cpuidle_init
   - pr_debug instead of pr_error for disabled GICC entries in
     ACPI/MADT"

* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
  arm64: Fix show_unhandled_signal_ratelimited usage
  ARM64 / SMP: Switch pr_err() to pr_debug() for disabled GICC entry
  arm64: cpuidle: add __init section marker to arm_cpuidle_init
  arm64: Don't report clear pmds and puds as huge
  arm64: perf: fix unassigned cpu_pmu->plat_device when probing PMU PPIs
  arm64: perf: Don't use of_node after putting it
  arm64: fix incorrect use of pgprot_t variable
  arm64/hw_breakpoint.c: remove unnecessary header
  arm64: bpf: fix endianness conversion bugs
  arm64: bpf: fix out-of-bounds read in bpf2a64_offset()
  ARM64: smp: Fix suspicious RCU usage with ipi tracepoints

1  2 
arch/arm64/mm/fault.c
arch/arm64/mm/hugetlbpage.c

diff --combined arch/arm64/mm/fault.c
index b1fc69cd14994a0d75b404c810e04814ee298340,ffa36e2d18e666e76223e9cf627f4227f55b2851..94d98cd1aad8a1e98472b95189e87f50f973156f
@@@ -115,7 -115,7 +115,7 @@@ static void __do_user_fault(struct task
  {
        struct siginfo si;
  
-       if (show_unhandled_signals_ratelimited() && unhandled_signal(tsk, sig)) {
+       if (unhandled_signal(tsk, sig) && show_unhandled_signals_ratelimited()) {
                pr_info("%s[%d]: unhandled %s (%d) at 0x%08lx, esr 0x%03x\n",
                        tsk->comm, task_pid_nr(tsk), fault_name(esr), sig,
                        addr, esr);
@@@ -210,7 -210,7 +210,7 @@@ static int __kprobes do_page_fault(unsi
         * If we're in an interrupt or have no user context, we must not take
         * the fault.
         */
 -      if (in_atomic() || !mm)
 +      if (faulthandler_disabled() || !mm)
                goto no_context;
  
        if (user_mode(regs))
index cccc4af87a0372976e25e16667143892562b3457,0eeb4f0930a08910b20320fadb765bab25106fc4..831ec534d449b0b7d040b41815b78df4c1e6ac4d
  #include <asm/tlbflush.h>
  #include <asm/pgalloc.h>
  
 -#ifndef CONFIG_ARCH_WANT_HUGE_PMD_SHARE
 -int huge_pmd_unshare(struct mm_struct *mm, unsigned long *addr, pte_t *ptep)
 -{
 -      return 0;
 -}
 -#endif
 -
  int pmd_huge(pmd_t pmd)
  {
-       return !(pmd_val(pmd) & PMD_TABLE_BIT);
+       return pmd_val(pmd) && !(pmd_val(pmd) & PMD_TABLE_BIT);
  }
  
  int pud_huge(pud_t pud)
  {
  #ifndef __PAGETABLE_PMD_FOLDED
-       return !(pud_val(pud) & PUD_TABLE_BIT);
+       return pud_val(pud) && !(pud_val(pud) & PUD_TABLE_BIT);
  #else
        return 0;
  #endif