1. 10 Mar, 2017 17 commits
  2. 08 Mar, 2017 8 commits
    • Linus Torvalds's avatar
      Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · ea6200e8
      Linus Torvalds authored
      Pull sched.h split-up fixes for MIPS from Ingo Molnar:
       "These are the fixes for MIPS build failures due to the sched.h
        split-up, from Arnd Bergmann"
      
      * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        MIPS: Add missing include files
      ea6200e8
    • Tony Luck's avatar
      mm, page_alloc: Add missing check for memory holes · b4fb8f66
      Tony Luck authored
      Commit 13ad59df ("mm, page_alloc: avoid page_to_pfn() when merging
      buddies") moved the check for memory holes out of page_is_buddy() and
      had the callers do the check.
      
      But this wasn't done correctly in one place which caused ia64 to crash
      very early in boot.
      
      Update to fix that and make ia64 boot again.
      
      [ v2: Vlastimil pointed out we don't need to call page_to_pfn()
            since we already have the result of that in "buddy_pfn" ]
      
      Fixes: 13ad59df ("avoid page_to_pfn() when merging buddies")
      Cc: Mel Gorman <mgorman@techsingularity.net>
      Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
      Cc: Michal Hocko <mhocko@kernel.org>
      Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
      Cc: Johannes Weiner <hannes@cmpxchg.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarTony Luck <tony.luck@intel.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      b4fb8f66
    • Linus Torvalds's avatar
      Merge tag 'ktest-v4.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest · 8557b8e4
      Linus Torvalds authored
      Pull ktest fixes from Steven Rostedt:
       "Greg Kroah-Hartman reported to me that the ktest of v4.11-rc1 locked
        up in an infinite loop while doing the make mrproper.
      
        Looking into the cause I noticed that a recent update to the function
        run_command (used for running all shell commands, including "make
        mrproper") changed the internal loop to use the function
        wait_for_input.
      
        The wait_for_input function uses select to look at two file
        descriptors. One is the file descriptor of the command it is running,
        the other is STDIN. The STDIN check was not checking the return status
        of the sysread call, and was also just writing a lot of data into
        syswrite without regard to the size of the data read.
      
        Changing the code to check the return status of sysread, and also to
        still process the passed in descriptor data without looping back to
        the select fixed Greg's problem.
      
        While looking at this code I also realized that the loop did not honor
        the timeout if STDIN always had input (or for some reason return
        error). this could prevent wait_for_input to timeout on the file
        descriptor it is suppose to be waiting for. That is fixed too"
      
      * tag 'ktest-v4.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest:
        ktest: Make sure wait_for_input does honor the timeout
        ktest: Fix while loop in wait_for_input
      8557b8e4
    • Linus Torvalds's avatar
      overlayfs: remove now unnecessary header file include · 04bb94b1
      Linus Torvalds authored
      This removes the extra include header file that was added in commit
      e58bc927 "Pull overlayfs updates from Miklos Szeredi" now that it
      is no longer needed.
      
      There are probably other such includes that got added during the
      scheduler header splitup series, but this is the one that annoyed me
      personally and I know about.
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      04bb94b1
    • Linus Torvalds's avatar
      sched/headers: fix up header file dependency on <linux/sched/signal.h> · bd0f9b35
      Linus Torvalds authored
      The scheduler header file split and cleanups ended up exposing a few
      nasty header file dependencies, and in particular it showed how we in
      <linux/wait.h> ended up depending on "signal_pending()", which now comes
      from <linux/sched/signal.h>.
      
      That's a very subtle and annoying dependency, which already caused a
      semantic merge conflict (see commit e58bc927 "Pull overlayfs updates
      from Miklos Szeredi", which added that fixup in the merge commit).
      
      It turns out that we can avoid this dependency _and_ improve code
      generation by moving the guts of the fairly nasty helper #define
      __wait_event_interruptible_locked() to out-of-line code.  The code that
      includes the signal_pending() check is all in the slow-path where we
      actually go to sleep waiting for the event anyway, so using a helper
      function is the right thing to do.
      
      Using a helper function is also what we already did for the non-locked
      versions, see the "__wait_event*()" macros and the "prepare_to_wait*()"
      set of helper functions.
      
      We might want to try to unify all these macro games, we have a _lot_ of
      subtly different wait-event loops.  But this is the minimal patch to fix
      the annoying header dependency.
      Acked-by: default avatarIngo Molnar <mingo@kernel.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      bd0f9b35
    • Steven Rostedt (VMware)'s avatar
      ktest: Make sure wait_for_input does honor the timeout · f7c6401f
      Steven Rostedt (VMware) authored
      The function wait_for_input takes in a timeout, and even has a default
      timeout. But if for some reason the STDIN descriptor keeps sending in data,
      the function will never time out. The timout is to wait for the data from
      the passed in file descriptor, not for STDIN. Adding a test in the case
      where there's no data from the passed in file descriptor that checks to see
      if the timeout passed, will ensure that it will timeout properly even if
      there's input in STDIN.
      Signed-off-by: default avatarSteven Rostedt (VMware) <rostedt@goodmis.org>
      f7c6401f
    • Steven Rostedt (VMware)'s avatar
      ktest: Fix while loop in wait_for_input · 99c014a8
      Steven Rostedt (VMware) authored
      The run_command function was changed to use the wait_for_input function to
      allow having a timeout if the command to run takes too much time. There was
      a bug in the wait_for_input where it could end up going into an infinite
      loop. There's two issues here. One is that the return value of the sysread
      wasn't used for the write (to write a proper size), and that it should
      continue processing the passed in file descriptor too even if there was
      input. There was no check for error, if for some reason STDIN returned an
      error, the function would go into an infinite loop and never exit.
      Reported-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Tested-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Fixes: 6e98d1b4 ("ktest: Add timeout to ssh command")
      Signed-off-by: default avatarSteven Rostedt (VMware) <rostedt@goodmis.org>
      99c014a8
    • Arnd Bergmann's avatar
      MIPS: Add missing include files · fc69910f
      Arnd Bergmann authored
      After the split of linux/sched.h, several platforms in arch/mips stopped building.
      
      Add the respective additional #include statements to fix the problem I first
      tried adding these into asm/processor.h, but ran into circular header
      dependencies with that which I could not figure out.
      
      The commit I listed as causing the problem is the branch merge, as there is
      likely a combination of multiple patches in that branch.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: linux-mips@linux-mips.org
      Cc: ralf@linux-mips.org
      Fixes: 1827adb1 ("Merge branch 'WIP.sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip")
      Link: http://lkml.kernel.org/r/20170308072931.3836696-1-arnd@arndb.deSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      fc69910f
  3. 07 Mar, 2017 15 commits
    • Linus Torvalds's avatar
      Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · ec3b93ae
      Linus Torvalds authored
      Pull x86 fixes from Ingo Molnar:
       "Misc fixes and minor updates all over the place:
      
         - an SGI/UV fix
         - a defconfig update
         - a build warning fix
         - move the boot_params file to the arch location in debugfs
         - a pkeys fix
         - selftests fix
         - boot message fixes
         - sparse fixes
         - a resume warning fix
         - ioapic hotplug fixes
         - reboot quirks
      
        ... plus various minor cleanups"
      
      * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/build/x86_64_defconfig: Enable CONFIG_R8169
        x86/reboot/quirks: Add ASUS EeeBook X205TA/W reboot quirk
        x86/hpet: Prevent might sleep splat on resume
        x86/boot: Correct setup_header.start_sys name
        x86/purgatory: Fix sparse warning, symbol not declared
        x86/purgatory: Make functions and variables static
        x86/events: Remove last remnants of old filenames
        x86/pkeys: Check against max pkey to avoid overflows
        x86/ioapic: Split IOAPIC hot-removal into two steps
        x86/PCI: Implement pcibios_release_device to release IRQ from IOAPIC
        x86/intel_rdt: Remove duplicate inclusion of linux/cpu.h
        x86/vmware: Remove duplicate inclusion of asm/timer.h
        x86/hyperv: Hide unused label
        x86/reboot/quirks: Add ASUS EeeBook X205TA reboot quirk
        x86/platform/uv/BAU: Fix HUB errors by remove initial write to sw-ack register
        x86/selftests: Add clobbers for int80 on x86_64
        x86/apic: Simplify enable_IR_x2apic(), remove try_to_enable_IR()
        x86/apic: Fix a warning message in logical CPU IDs allocation
        x86/kdebugfs: Move boot params hierarchy under (debugfs)/x86/
      ec3b93ae
    • Linus Torvalds's avatar
      Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 8a917235
      Linus Torvalds authored
      Pull timer fixes from Ingo Molnar:
       "This includes a fix for lockups caused by incorrect nsecs related
        cleanup, and a capabilities check fix for timerfd"
      
      * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        jiffies: Revert bogus conversion of NSEC_PER_SEC to TICK_NSEC
        timerfd: Only check CAP_WAKE_ALARM when it is needed
      8a917235
    • Linus Torvalds's avatar
      Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 609b07b7
      Linus Torvalds authored
      Pull scheduler fixes from Ingo Molnar:
       "A fix for KVM's scheduler clock which (erroneously) was always marked
        unstable, a fix for RT/DL load balancing, plus latency fixes"
      
      * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        sched/clock, x86/tsc: Rework the x86 'unstable' sched_clock() interface
        sched/core: Fix pick_next_task() for RT,DL
        sched/fair: Make select_idle_cpu() more aggressive
      609b07b7
    • Linus Torvalds's avatar
      Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · c3abcabe
      Linus Torvalds authored
      Pull perf fixes from Ingo Molnar:
       "This includes a fix for a crash if certain special addresses are
        kprobed, plus does a rename of two Kconfig variables that were a minor
        misnomer"
      
      * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        perf/core: Rename CONFIG_[UK]PROBE_EVENT to CONFIG_[UK]PROBE_EVENTS
        kprobes/x86: Fix kernel panic when certain exception-handling addresses are probed
      c3abcabe
    • Linus Torvalds's avatar
      Merge branch 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 500e1af2
      Linus Torvalds authored
      Pull locking fixes from Ingo Molnar:
      
       - Change the new refcount_t warnings from WARN() to WARN_ONCE()
      
       - two ww_mutex fixes
      
       - plus a new lockdep self-consistency check for a bug that triggered in
         practice
      
      * 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        locking/ww_mutex: Adjust the lock number for stress test
        locking/lockdep: Add nest_lock integrity test
        locking/ww_mutex: Replace cpu_relax() with cond_resched() for tests
        locking/refcounts: Change WARN() to WARN_ONCE()
      500e1af2
    • Linus Torvalds's avatar
      Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 26db8f99
      Linus Torvalds authored
      Pull IRQ fix from Ingo Molnar:
       "Fix an ARM TI DRA7XX SoC irqchip driver local variables type
        bug/warning"
      
      * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        irqchip/crossbar: Fix incorrect type of local variables
      26db8f99
    • Linus Torvalds's avatar
      Merge branch 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 21f85778
      Linus Torvalds authored
      Pull EFI fixes from Ingo Molnar:
       "A boot crash fix, and a secure boot related boot messages fix"
      
      * 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        efi/arm: Fix boot crash with CONFIG_CPUMASK_OFFSTACK=y
        efi/libstub: Treat missing SecureBoot variable as Secure Boot disabled
      21f85778
    • Linus Torvalds's avatar
      Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · c688f14c
      Linus Torvalds authored
      Pull core fixes from Ingo Molnar:
       "A couple of sched.h splitup related build fixes, plus an objtool fix"
      
      * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        objtool: Fix another GCC jump table detection issue
        drivers/char/nwbutton: Fix build breakage caused by include file reshuffling
        h8300: Fix build breakage caused by header file changes
        avr32: Fix build error caused by include file reshuffling
      c688f14c
    • Linus Torvalds's avatar
      Merge branch 'idr-4.11' of git://git.infradead.org/users/willy/linux-dax · 9e91c144
      Linus Torvalds authored
      Pull idr fix (and new tests) from Matthew Wilcox:
       "One urgent patch in here; freeing the correct IDA bitmap.
      
        Everything else is changes to the test suite"
      
      * 'idr-4.11' of git://git.infradead.org/users/willy/linux-dax:
        radix tree test suite: Specify -m32 in LDFLAGS too
        ida: Free correct IDA bitmap
        radix tree test suite: Depend on Makefile and quieten grep
        radix tree test suite: Fix build with --as-needed
        radix tree test suite: Build 32 bit binaries
        radix tree test suite: Add performance test for radix_tree_join()
        radix tree test suite: Add performance test for radix_tree_split()
        radix tree test suite: Add performance benchmarks
        radix tree test suite: Add test for radix_tree_clear_tags()
        radix tree test suite: Add tests for ida_simple_get() and ida_simple_remove()
        radix tree test suite: Add test for idr_get_next()
      9e91c144
    • Linus Torvalds's avatar
      Merge tag 'powerpc-4.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux · f7d6a728
      Linus Torvalds authored
      Pull powerpc fixes from Michael Ellerman:
       "Five fairly small fixes for things that went in this cycle.
      
        A fairly large patch to rework the CAS logic on Power9, necessitated
        by a late change to the firmware API, and we can't boot without it.
      
        Three fixes going to stable, allowing more instructions to be emulated
        on LE, fixing a boot crash on 32-bit Freescale BookE machines, and the
        OPAL XICS workaround.
      
        And a patch from me to sort the selects under CONFIG PPC. Annoying
        churn, but worth it in the long run, and best for it to go in now to
        avoid conflicts.
      
        Thanks to:
          Alexey Kardashevskiy, Anton Blanchard, Balbir Singh, Gautham R.
          Shenoy, Laurentiu Tudor, Nicholas Piggin, Paul Mackerras, Ravi
          Bangoria, Sachin Sant, Shile Zhang, Suraj Jitindar Singh"
      
      * tag 'powerpc-4.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
        powerpc: Sort the selects under CONFIG_PPC
        powerpc/64: Fix L1D cache shape vector reporting L1I values
        powerpc/64: Avoid panic during boot due to divide by zero in init_cache_info()
        powerpc: Update to new option-vector-5 format for CAS
        powerpc: Parse the command line before calling CAS
        powerpc/xics: Work around limitations of OPAL XICS priority handling
        powerpc/64: Fix checksum folding in csum_add()
        powerpc/powernv: Fix opal tracepoints with JUMP_LABEL=n
        powerpc/booke: Fix boot crash due to null hugepd
        powerpc: Fix compiling a BE kernel with a powerpc64le toolchain
        selftest/powerpc: Fix false failures for skipped tests
        powerpc/powernv: Fix bug due to labeling ambiguity in power_enter_stop
        powerpc/64: Invalidate process table caching after setting process table
        powerpc: emulate_step() tests for load/store instructions
        powerpc: Emulation support for load/store instructions on LE
      f7d6a728
    • Linus Torvalds's avatar
      Merge branch 'stable/for-linus-4.11' of... · 8c2c8ed8
      Linus Torvalds authored
      Merge branch 'stable/for-linus-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/swiotlb
      
      Pull swiotlb updates from Konrad Rzeszutek Wilk:
       "Two tiny implementations of the DMA API for callback in ARM (for Xen)"
      
      * 'stable/for-linus-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/swiotlb:
        swiotlb-xen: implement xen_swiotlb_get_sgtable callback
        swiotlb-xen: implement xen_swiotlb_dma_mmap callback
      8c2c8ed8
    • Matthew Wilcox's avatar
      radix tree test suite: Specify -m32 in LDFLAGS too · f0f3f2d0
      Matthew Wilcox authored
      Michael's patch to use the default make rule for linking and the patch
      from Rehas to use -m32 if building a 32-bit test-suite on a 64-bit
      platform don't work well together.
      Reported-by: default avatarRehas Sachdeva <aquannie@gmail.com>
      Signed-off-by: default avatarMatthew Wilcox <mawilcox@microsoft.com>
      f0f3f2d0
    • Matthew Wilcox's avatar
      ida: Free correct IDA bitmap · 4ecd9542
      Matthew Wilcox authored
      There's a relatively rare race where we look at the per-cpu preallocated
      IDA bitmap, see it's NULL, allocate a new one, and atomically update it.
      If the kmalloc() happened to sleep and we were rescheduled to a different
      CPU, or an interrupt came in at the exact right time, another task
      might have successfully allocated a bitmap and already deposited it.
      I forgot what the semantics of cmpxchg() were and ended up freeing the
      wrong bitmap leading to KASAN reporting a use-after-free.
      
      Dmitry found the bug with syzkaller & wrote the patch.  I wrote the test
      case that will reproduce the bug without his patch being applied.
      Reported-by: default avatarDmitry Vyukov <dvyukov@google.com>
      Signed-off-by: default avatarMatthew Wilcox <mawilcox@microsoft.com>
      4ecd9542
    • Matthew Wilcox's avatar
      radix tree test suite: Depend on Makefile and quieten grep · 3f1b6f9d
      Matthew Wilcox authored
      Changing the CFLAGS in the Makefile didn't always lead to a
      recompilation because the OFILES didn't depend on the Makefile.
      Also, after doing make clean, grep would still complain about
      a missing map-shift.h; we need -s as well as -q.
      Signed-off-by: default avatarMatthew Wilcox <mawilcox@microsoft.com>
      3f1b6f9d
    • Michael Ellerman's avatar
      radix tree test suite: Fix build with --as-needed · 284d96a4
      Michael Ellerman authored
      Currently the radix tree test suite doesn't build with toolchains that
      use --as-needed by default, for example Ubuntu's:
      
        cc -I. -I../../include -g -O2 -Wall -D_LGPL_SOURCE -fsanitize=address -lpthread -lurcu main.o ... -o main
        /usr/bin/ld: regression1.o: undefined reference to symbol 'pthread_join@@GLIBC_2.17'
        /lib/powerpc64le-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line
        collect2: error: ld returned 1 exit status
      
      This is caused by the custom makefile rules placing LDFLAGS before the
      .o files that need the libraries.
      
      We could fix it by using --no-as-needed, or rewriting the custom rules.
      But we can also just drop the custom rules and move the libraries to
      LDLIBS, and then the default rules work correctly - with the one caveat
      that we need to add -fsanitize=address to LDFLAGS because that must be
      passed to the linker as well as the compiler.
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      Signed-off-by: default avatarMatthew Wilcox <mawilcox@microsoft.com>
      284d96a4