1. 29 Apr, 2019 1 commit
  2. 19 Apr, 2019 7 commits
  3. 18 Apr, 2019 1 commit
    • YueHaibing's avatar
      sched/core: Make some functions static · b1546edc
      YueHaibing authored
      Fix these sparse warnings:
      
        kernel/sched/core.c:6577:11: warning: symbol 'min_cfs_quota_period' was not declared. Should it be static?
        kernel/sched/core.c:6657:5: warning: symbol 'tg_set_cfs_quota' was not declared. Should it be static?
        kernel/sched/core.c:6670:6: warning: symbol 'tg_get_cfs_quota' was not declared. Should it be static?
        kernel/sched/core.c:6683:5: warning: symbol 'tg_set_cfs_period' was not declared. Should it be static?
        kernel/sched/core.c:6693:6: warning: symbol 'tg_get_cfs_period' was not declared. Should it be static?
        kernel/sched/fair.c:2596:6: warning: symbol 'task_tick_numa' was not declared. Should it be static?
      Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Link: http://lkml.kernel.org/r/20190418144713.34332-1-yuehaibing@huawei.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      b1546edc
  4. 16 Apr, 2019 4 commits
  5. 10 Apr, 2019 2 commits
    • Valentin Schneider's avatar
      sched/topology: Skip duplicate group rewrites in build_sched_groups() · 67d4f6ff
      Valentin Schneider authored
      While staring at build_sched_domains(), I realized that get_group()
      does several duplicate (thus useless) writes.
      
      If you take the Arm Juno r0 (LITTLEs = [0, 3, 4, 5], bigs = [1, 2]), the
      sched_group build flow would look like this:
      
      ('MC[cpu]->sg' means 'per_cpu_ptr(&tl->data->sg, cpu)' with 'tl == MC')
      
      build_sched_groups(MC[CPU0]->sd, CPU0)
        get_group(0) -> MC[CPU0]->sg
        get_group(3) -> MC[CPU3]->sg
        get_group(4) -> MC[CPU4]->sg
        get_group(5) -> MC[CPU5]->sg
      
      build_sched_groups(DIE[CPU0]->sd, CPU0)
        get_group(0) -> DIE[CPU0]->sg
        get_group(1) -> DIE[CPU1]->sg <=================+
      						  |
      build_sched_groups(MC[CPU1]->sd, CPU1)            |
        get_group(1) -> MC[CPU1]->sg                    |
        get_group(2) -> MC[CPU2]->sg                    |
      						  |
      build_sched_groups(DIE[CPU1]->sd, CPU1)           ^
        get_group(1) -> DIE[CPU1]->sg  } We've set up these two up here!
        get_group(3) -> DIE[CPU0]->sg  }
      
      From this point on, we will only use sched_groups that have been
      previously visited & initialized. The only new operation will
      be which group pointer we affect to sd->groups.
      
      On the Juno r0 we get 32 get_group() calls, every single one of them
      writing to a sched_group->cpumask. However, all of the data structures
      we need are set up after 8 visits (see above).
      
      Return early from get_group() if we've already visited (and thus
      initialized) the sched_group we're looking at. Overlapping domains
      are not affected as they do not use build_sched_groups().
      
      Tested on a Juno and a 2 * (Xeon E5-2690) system.
      
      ( FWIW I initially checked the refs for both sg && sg->sgc, but figured if
        they weren't both 0 or > 1 then something must have gone wrong, so I
        threw in a WARN_ON(). )
      
      No change in functionality intended.
      Signed-off-by: default avatarValentin Schneider <valentin.schneider@arm.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      67d4f6ff
    • Valentin Schneider's avatar
      sched/topology: Fix build_sched_groups() comment · d8743230
      Valentin Schneider authored
      The comment was introduced (pre 2.6.12) by:
      
        8a7a2318 ("[PATCH] sched: consolidate sched domains")
      
      and referred to sched_group->cpu_power. This was folded into
      sched_group->sched_group_power in
      
        commit 9c3f75cb ("sched: Break out cpu_power from the sched_group structure")
      
      The comment was then updated in:
      
        ced549fa ("sched: Remove remaining dubious usage of "power"")
      
      but should have replaced "sg->cpu_capacity" with
      "sg->sched_group_capacity". Do that now.
      Signed-off-by: default avatarValentin Schneider <valentin.schneider@arm.com>
      Cc: Dietmar.Eggemann@arm.com
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: morten.rasmussen@arm.com
      Cc: qais.yousef@arm.com
      Link: http://lkml.kernel.org/r/20190409173546.4747-3-valentin.schneider@arm.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      d8743230
  6. 03 Apr, 2019 6 commits
    • YueHaibing's avatar
      sched/fair: Make sync_entity_load_avg() and remove_entity_load_avg() static · 71b47eaf
      YueHaibing authored
      Fix these sparse warnigs:
      
        kernel/sched/fair.c:3570:6: warning: symbol 'sync_entity_load_avg' was not declared. Should it be static?
        kernel/sched/fair.c:3583:6: warning: symbol 'remove_entity_load_avg' was not declared. Should it be static?
      Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
      Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Link: https://lkml.kernel.org/r/20190320133839.21392-1-yuehaibing@huawei.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      71b47eaf
    • Joel Fernandes (Google)'s avatar
      sched/core: Annotate perf_domain pointer with __rcu · 7ba7319f
      Joel Fernandes (Google) authored
      This fixes the following sparse errors in sched/fair.c:
      
        fair.c:6506:14: error: incompatible types in comparison expression
        fair.c:8642:21: error: incompatible types in comparison expression
      
      Using __rcu will also help sparse catch any future bugs.
      Signed-off-by: default avatarJoel Fernandes (Google) <joel@joelfernandes.org>
      Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      [ From an RCU perspective. ]
      Reviewed-by: default avatarPaul E. McKenney <paulmck@linux.ibm.com>
      Cc: Josh Triplett <josh@joshtriplett.org>
      Cc: Lai Jiangshan <jiangshanlai@gmail.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
      Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Morten Rasmussen <morten.rasmussen@arm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: keescook@chromium.org
      Cc: kernel-hardening@lists.openwall.com
      Cc: kernel-team@android.com
      Link: https://lkml.kernel.org/r/20190321003426.160260-5-joel@joelfernandes.orgSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      7ba7319f
    • Joel Fernandes (Google)'s avatar
      rcuwait: Annotate task_struct with __rcu · 03f4b48e
      Joel Fernandes (Google) authored
      This suppresses sparse error generated due to the recently added
      rcu_assign_pointer sparse check.
      
        percpu-rwsem.c:162:9: sparse: error: incompatible types in comparison expression
        exit.c:316:16: sparse: error: incompatible types in comparison expression
      Signed-off-by: default avatarJoel Fernandes (Google) <joel@joelfernandes.org>
      Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      [ From an RCU perspective. ]
      Reviewed-by: default avatarPaul E. McKenney <paulmck@linux.ibm.com>
      Cc: Josh Triplett <josh@joshtriplett.org>
      Cc: Lai Jiangshan <jiangshanlai@gmail.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
      Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Morten Rasmussen <morten.rasmussen@arm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: keescook@chromium.org
      Cc: kernel-hardening@lists.openwall.com
      Cc: kernel-team@android.com
      Link: https://lkml.kernel.org/r/20190321003426.160260-4-joel@joelfernandes.orgSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      03f4b48e
    • Joel Fernandes (Google)'s avatar
      sched_domain: Annotate RCU pointers properly · 994aeb7a
      Joel Fernandes (Google) authored
      The scheduler uses RCU API in various places to access sched_domain
      pointers. These cause sparse errors as below.
      
      Many new errors show up because of an annotation check I added to
      rcu_assign_pointer(). Let us annotate the pointers correctly which also
      will help sparse catch any potential future bugs.
      
      This fixes the following sparse errors:
      
        rt.c:1681:9: error: incompatible types in comparison expression
        deadline.c:1904:9: error: incompatible types in comparison expression
        core.c:519:9: error: incompatible types in comparison expression
        core.c:1634:17: error: incompatible types in comparison expression
        fair.c:6193:14: error: incompatible types in comparison expression
        fair.c:9883:22: error: incompatible types in comparison expression
        fair.c:9897:9: error: incompatible types in comparison expression
        sched.h:1287:9: error: incompatible types in comparison expression
        topology.c:612:9: error: incompatible types in comparison expression
        topology.c:615:9: error: incompatible types in comparison expression
        sched.h:1300:9: error: incompatible types in comparison expression
        topology.c:618:9: error: incompatible types in comparison expression
        sched.h:1287:9: error: incompatible types in comparison expression
        topology.c:621:9: error: incompatible types in comparison expression
        sched.h:1300:9: error: incompatible types in comparison expression
        topology.c:624:9: error: incompatible types in comparison expression
        topology.c:671:9: error: incompatible types in comparison expression
        stats.c:45:17: error: incompatible types in comparison expression
        fair.c:5998:15: error: incompatible types in comparison expression
        fair.c:5989:15: error: incompatible types in comparison expression
        fair.c:5998:15: error: incompatible types in comparison expression
        fair.c:5989:15: error: incompatible types in comparison expression
        fair.c:6120:19: error: incompatible types in comparison expression
        fair.c:6506:14: error: incompatible types in comparison expression
        fair.c:6515:14: error: incompatible types in comparison expression
        fair.c:6623:9: error: incompatible types in comparison expression
        fair.c:5970:17: error: incompatible types in comparison expression
        fair.c:8642:21: error: incompatible types in comparison expression
        fair.c:9253:9: error: incompatible types in comparison expression
        fair.c:9331:9: error: incompatible types in comparison expression
        fair.c:9519:15: error: incompatible types in comparison expression
        fair.c:9533:14: error: incompatible types in comparison expression
        fair.c:9542:14: error: incompatible types in comparison expression
        fair.c:9567:14: error: incompatible types in comparison expression
        fair.c:9597:14: error: incompatible types in comparison expression
        fair.c:9421:16: error: incompatible types in comparison expression
        fair.c:9421:16: error: incompatible types in comparison expression
      Signed-off-by: default avatarJoel Fernandes (Google) <joel@joelfernandes.org>
      Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      [ From an RCU perspective. ]
      Reviewed-by: default avatarPaul E. McKenney <paulmck@linux.ibm.com>
      Cc: Josh Triplett <josh@joshtriplett.org>
      Cc: Lai Jiangshan <jiangshanlai@gmail.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
      Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Morten Rasmussen <morten.rasmussen@arm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: keescook@chromium.org
      Cc: kernel-hardening@lists.openwall.com
      Cc: kernel-team@android.com
      Link: https://lkml.kernel.org/r/20190321003426.160260-3-joel@joelfernandes.orgSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      994aeb7a
    • Joel Fernandes (Google)'s avatar
      sched/cpufreq: Annotate cpufreq_update_util_data pointer with __rcu · b10abd0a
      Joel Fernandes (Google) authored
      Recently I added an RCU annotation check to rcu_assign_pointer(). All
      pointers assigned to RCU protected data are to be annotated with __rcu
      inorder to be able to use rcu_assign_pointer() similar to checks in
      other RCU APIs.
      
      This resulted in a sparse error:
      
        kernel//sched/cpufreq.c:41:9: sparse: error: incompatible types in comparison expression (different address spaces)
      
      Fix this by annotating cpufreq_update_util_data pointer with __rcu. This
      will also help sparse catch any future RCU misuage bugs.
      Signed-off-by: default avatarJoel Fernandes (Google) <joel@joelfernandes.org>
      [ From an RCU perspective. ]
      Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Reviewed-by: default avatarPaul E. McKenney <paulmck@linux.ibm.com>
      Cc: Josh Triplett <josh@joshtriplett.org>
      Cc: Lai Jiangshan <jiangshanlai@gmail.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
      Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Morten Rasmussen <morten.rasmussen@arm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: keescook@chromium.org
      Cc: kernel-hardening@lists.openwall.com
      Cc: kernel-team@android.com
      Link: https://lkml.kernel.org/r/20190321003426.160260-2-joel@joelfernandes.orgSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      b10abd0a
    • Mel Gorman's avatar
      sched/fair: Do not re-read ->h_load_next during hierarchical load calculation · 0e9f0245
      Mel Gorman authored
      A NULL pointer dereference bug was reported on a distribution kernel but
      the same issue should be present on mainline kernel. It occured on s390
      but should not be arch-specific.  A partial oops looks like:
      
        Unable to handle kernel pointer dereference in virtual kernel address space
        ...
        Call Trace:
          ...
          try_to_wake_up+0xfc/0x450
          vhost_poll_wakeup+0x3a/0x50 [vhost]
          __wake_up_common+0xbc/0x178
          __wake_up_common_lock+0x9e/0x160
          __wake_up_sync_key+0x4e/0x60
          sock_def_readable+0x5e/0x98
      
      The bug hits any time between 1 hour to 3 days. The dereference occurs
      in update_cfs_rq_h_load when accumulating h_load. The problem is that
      cfq_rq->h_load_next is not protected by any locking and can be updated
      by parallel calls to task_h_load. Depending on the compiler, code may be
      generated that re-reads cfq_rq->h_load_next after the check for NULL and
      then oops when reading se->avg.load_avg. The dissassembly showed that it
      was possible to reread h_load_next after the check for NULL.
      
      While this does not appear to be an issue for later compilers, it's still
      an accident if the correct code is generated. Full locking in this path
      would have high overhead so this patch uses READ_ONCE to read h_load_next
      only once and check for NULL before dereferencing. It was confirmed that
      there were no further oops after 10 days of testing.
      
      As Peter pointed out, it is also necessary to use WRITE_ONCE() to avoid any
      potential problems with store tearing.
      Signed-off-by: default avatarMel Gorman <mgorman@techsingularity.net>
      Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Reviewed-by: default avatarValentin Schneider <valentin.schneider@arm.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: <stable@vger.kernel.org>
      Fixes: 68520796 ("sched: Move h_load calculation to task_h_load()")
      Link: https://lkml.kernel.org/r/20190319123610.nsivgf3mjbjjesxb@techsingularity.netSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      0e9f0245
  7. 01 Apr, 2019 5 commits
  8. 31 Mar, 2019 9 commits
    • Linus Torvalds's avatar
      Linux 5.1-rc3 · 79a3aaa7
      Linus Torvalds authored
      79a3aaa7
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm · 63fc9c23
      Linus Torvalds authored
      Pull KVM fixes from Paolo Bonzini:
       "A collection of x86 and ARM bugfixes, and some improvements to
        documentation.
      
        On top of this, a cleanup of kvm_para.h headers, which were exported
        by some architectures even though they not support KVM at all. This is
        responsible for all the Kbuild changes in the diffstat"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (28 commits)
        Documentation: kvm: clarify KVM_SET_USER_MEMORY_REGION
        KVM: doc: Document the life cycle of a VM and its resources
        KVM: selftests: complete IO before migrating guest state
        KVM: selftests: disable stack protector for all KVM tests
        KVM: selftests: explicitly disable PIE for tests
        KVM: selftests: assert on exit reason in CR4/cpuid sync test
        KVM: x86: update %rip after emulating IO
        x86/kvm/hyper-v: avoid spurious pending stimer on vCPU init
        kvm/x86: Move MSR_IA32_ARCH_CAPABILITIES to array emulated_msrs
        KVM: x86: Emulate MSR_IA32_ARCH_CAPABILITIES on AMD hosts
        kvm: don't redefine flags as something else
        kvm: mmu: Used range based flushing in slot_handle_level_range
        KVM: export <linux/kvm_para.h> and <asm/kvm_para.h> iif KVM is supported
        KVM: x86: remove check on nr_mmu_pages in kvm_arch_commit_memory_region()
        kvm: nVMX: Add a vmentry check for HOST_SYSENTER_ESP and HOST_SYSENTER_EIP fields
        KVM: SVM: Workaround errata#1096 (insn_len maybe zero on SMAP violation)
        KVM: Reject device ioctls from processes other than the VM's creator
        KVM: doc: Fix incorrect word ordering regarding supported use of APIs
        KVM: x86: fix handling of role.cr4_pae and rename it to 'gpte_size'
        KVM: nVMX: Do not inherit quadrant and invalid for the root shadow EPT
        ...
      63fc9c23
    • Linus Torvalds's avatar
      Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 915ee0da
      Linus Torvalds authored
      Pull x86 fixes from Thomas Gleixner:
       "A pile of x86 updates:
      
         - Prevent exceeding he valid physical address space in the /dev/mem
           limit checks.
      
         - Move all header content inside the header guard to prevent compile
           failures.
      
         - Fix the bogus __percpu annotation in this_cpu_has() which makes
           sparse very noisy.
      
         - Disable switch jump tables completely when retpolines are enabled.
      
         - Prevent leaking the trampoline address"
      
      * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/realmode: Make set_real_mode_mem() static inline
        x86/cpufeature: Fix __percpu annotation in this_cpu_has()
        x86/mm: Don't exceed the valid physical address space
        x86/retpolines: Disable switch jump tables when retpolines are enabled
        x86/realmode: Don't leak the trampoline kernel address
        x86/boot: Fix incorrect ifdeffery scope
        x86/resctrl: Remove unused variable
      915ee0da
    • Linus Torvalds's avatar
      Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 590627f7
      Linus Torvalds authored
      Pull perf tooling fixes from Thomas Gleixner:
       "Core libraries:
         - Fix max perf_event_attr.precise_ip detection.
         - Fix parser error for uncore event alias
         - Fixup ordering of kernel maps after obtaining the main kernel map
           address.
      
        Intel PT:
         - Fix TSC slip where A TSC packet can slip past MTC packets so that
           the timestamp appears to go backwards.
         - Fixes for exported-sql-viewer GUI conversion to python3.
      
        ARM coresight:
         - Fix the build by adding a missing case value for enumeration value
           introduced in newer library, that now is the required one.
      
        tool headers:
         - Syncronize kernel headers with the kernel, getting new io_uring and
           pidfd_send_signal syscalls so that 'perf trace' can handle them"
      
      * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        perf pmu: Fix parser error for uncore event alias
        perf scripts python: exported-sql-viewer.py: Fix python3 support
        perf scripts python: exported-sql-viewer.py: Fix never-ending loop
        perf machine: Update kernel map address and re-order properly
        tools headers uapi: Sync powerpc's asm/kvm.h copy with the kernel sources
        tools headers: Update x86's syscall_64.tbl and uapi/asm-generic/unistd
        tools headers uapi: Update drm/i915_drm.h
        tools arch x86: Sync asm/cpufeatures.h with the kernel sources
        tools headers uapi: Sync linux/fcntl.h to get the F_SEAL_FUTURE_WRITE addition
        tools headers uapi: Sync asm-generic/mman-common.h and linux/mman.h
        perf evsel: Fix max perf_event_attr.precise_ip detection
        perf intel-pt: Fix TSC slip
        perf cs-etm: Add missing case value
      590627f7
    • Linus Torvalds's avatar
      Merge branch 'smp-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · c29d8541
      Linus Torvalds authored
      Pull CPU hotplug fixes from Thomas Gleixner:
       "Two SMT/hotplug related fixes:
      
         - Prevent crash when HOTPLUG_CPU is disabled and the CPU bringup
           aborts. This is triggered with the 'nosmt' command line option, but
           can happen by any abort condition. As the real unplug code is not
           compiled in, prevent the fail by keeping the CPU in zombie state.
      
         - Enforce HOTPLUG_CPU for SMP on x86 to avoid the above situation
           completely. With 'nosmt' being a popular option it's required to
           unplug the half brought up sibling CPUs (due to the MCE wreckage)
           completely"
      
      * 'smp-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/smp: Enforce CONFIG_HOTPLUG_CPU when SMP=y
        cpu/hotplug: Prevent crash when CPU bringup fails on CONFIG_HOTPLUG_CPU=n
      c29d8541
    • Linus Torvalds's avatar
      Merge branch 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 573efdc5
      Linus Torvalds authored
      Pull locking fixlet from Thomas Gleixner:
       "Trivial update to the maintainers file"
      
      * 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        MAINTAINERS: Remove deleted file from futex file pattern
      573efdc5
    • Linus Torvalds's avatar
      Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · f78b5be2
      Linus Torvalds authored
      Pull core fixes from Thomas Gleixner:
       "A small set of core updates:
      
         - Make the watchdog respect the selected CPU mask again. That was
           broken by the rework of the watchdog thread management and caused
           inconsistent state and NMI watchdog being unstoppable.
      
         - Ensure that the objtool build can find the libelf location.
      
         - Remove dead kcore stub code"
      
      * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        watchdog: Respect watchdog cpumask on CPU hotplug
        objtool: Query pkg-config for libelf location
        proc/kcore: Remove unused kclist_add_remap()
      f78b5be2
    • Linus Torvalds's avatar
      Merge tag 'powerpc-5.1-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux · 6536c5f2
      Linus Torvalds authored
      Pull powerpc fixes from Michael Ellerman:
       "Three non-regression fixes.
      
         - Our optimised memcmp could read past the end of one of the buffers
           and potentially trigger a page fault leading to an oops.
      
         - Some of our code to read energy management data on PowerVM had an
           endian bug leading to bogus results.
      
         - When reporting a machine check exception we incorrectly reported
           TLB multihits as D-Cache multhits due to a missing entry in the
           array of causes.
      
        Thanks to: Chandan Rajendra, Gautham R. Shenoy, Mahesh Salgaonkar,
        Segher Boessenkool, Vaidyanathan Srinivasan"
      
      * tag 'powerpc-5.1-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
        powerpc/pseries/mce: Fix misleading print for TLB mutlihit
        powerpc/pseries/energy: Use OF accessor functions to read ibm,drc-indexes
        powerpc/64: Fix memcmp reading past the end of src/dest
      6536c5f2
    • Linus Torvalds's avatar
      Merge tag 'dmaengine-fix-5.1-rc3' of git://git.infradead.org/users/vkoul/slave-dma · c877b3df
      Linus Torvalds authored
      Pull dmaengine fixes from Vinod Koul:
      
       - Revert "dmaengine: stm32-mdma: Add a check on read_u32_array" as that
         caused regression
      
       - Fix MAINTAINER file uniphier-mdmac.c file path
      
      * tag 'dmaengine-fix-5.1-rc3' of git://git.infradead.org/users/vkoul/slave-dma:
        MAINTAINERS: Fix uniphier-mdmac.c file path
        dmaengine: stm32-mdma: Revert "dmaengine: stm32-mdma: Add a check on read_u32_array"
      c877b3df
  9. 30 Mar, 2019 5 commits
    • Linus Torvalds's avatar
      Merge tag 'led-fixes-for-5.1-rc3' of... · b5c8314f
      Linus Torvalds authored
      Merge tag 'led-fixes-for-5.1-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds
      
      Pull LED fixes from Jacek Anaszewski:
      
       - fix refcnt leak on interface rename
      
       - use memcpy in device_name_store() to avoid including garbage from a
         previous, longer value in the device_name
      
       - fix a potential NULL pointer dereference in case of_match_device()
         cannot find a match
      
      * tag 'led-fixes-for-5.1-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds:
        leds: trigger: netdev: use memcpy in device_name_store
        leds: pca9532: fix a potential NULL pointer dereference
        leds: trigger: netdev: fix refcnt leak on interface rename
      b5c8314f
    • Linus Torvalds's avatar
      Merge tag 'gpio-v5.1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio · 3af9a525
      Linus Torvalds authored
      Pull GPIO fixes from Linus Walleij:
       "As you can see [in the git history] I was away on leave and Bartosz
        kindly stepped in and collected a slew of fixes, I pulled them into my
        tree in two sets and merged some two more fixes (fixing my own caused
        bugs) on top.
      
        Summary:
      
         - Revert the extended use of gpio_set_config() and think about how we
           can do this properly.
      
         - Fix up the SPI CS GPIO handling so it now works properly on the SPI
           bus children, as intended.
      
         - Error paths and driver fixes"
      
      * tag 'gpio-v5.1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio:
        gpio: mockup: use simple_read_from_buffer() in debugfs read callback
        gpio: of: Fix of_gpiochip_add() error path
        gpio: of: Check for "spi-cs-high" in child instead of parent node
        gpio: of: Check propname before applying "cs-gpios" quirks
        gpio: mockup: fix debugfs read
        Revert "gpio: use new gpio_set_config() helper in more places"
        gpio: aspeed: fix a potential NULL pointer dereference
        gpio: amd-fch: Fix bogus SPDX identifier
        gpio: adnp: Fix testing wrong value in adnp_gpio_direction_input
        gpio: exar: add a check for the return value of ida_simple_get fails
      3af9a525
    • Rasmus Villemoes's avatar
      leds: trigger: netdev: use memcpy in device_name_store · 90934643
      Rasmus Villemoes authored
      If userspace doesn't end the input with a newline (which can easily
      happen if the write happens from a C program that does write(fd,
      iface, strlen(iface))), we may end up including garbage from a
      previous, longer value in the device_name. For example
      
      # cat device_name
      
      # printf 'eth12' > device_name
      # cat device_name
      eth12
      # printf 'eth3' > device_name
      # cat device_name
      eth32
      
      I highly doubt anybody is relying on this behaviour, so switch to
      simply copying the bytes (we've already checked that size is <
      IFNAMSIZ) and unconditionally zero-terminate it; of course, we also
      still have to strip a trailing newline.
      
      This is also preparation for future patches.
      
      Fixes: 06f502f5 ("leds: trigger: Introduce a NETDEV trigger")
      Signed-off-by: default avatarRasmus Villemoes <linux@rasmusvillemoes.dk>
      Acked-by: default avatarPavel Machek <pavel@ucw.cz>
      Signed-off-by: default avatarJacek Anaszewski <jacek.anaszewski@gmail.com>
      90934643
    • Kangjie Lu's avatar
      leds: pca9532: fix a potential NULL pointer dereference · 0aab8e4d
      Kangjie Lu authored
      In case of_match_device cannot find a match, return -EINVAL to avoid
      NULL pointer dereference.
      
      Fixes: fa4191a6 ("leds: pca9532: Add device tree support")
      Signed-off-by: default avatarKangjie Lu <kjlu@umn.edu>
      Signed-off-by: default avatarJacek Anaszewski <jacek.anaszewski@gmail.com>
      0aab8e4d
    • Linus Torvalds's avatar
      Merge tag 'staging-5.1-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging · 32faca66
      Linus Torvalds authored
      Pull staging driver fixes from Greg KH:
       "Here are some small staging driver fixes for 5.1-rc3, and one driver
        removal.
      
        The biggest thing here is the removal of the mt7621-eth driver as a
        "real" network driver was merged in 5.1-rc1 for this hardware, so this
        old driver can now be removed.
      
        Other than that, there are just a number of small fixes, all resolving
        reported issues and some potential corner cases for error handling
        paths.
      
        All of these have been in linux-next with no reported issues"
      
      * tag 'staging-5.1-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
        staging: vt6655: Remove vif check from vnt_interrupt
        staging: erofs: keep corrupted fs from crashing kernel in erofs_readdir()
        staging: octeon-ethernet: fix incorrect PHY mode
        staging: vc04_services: Fix an error code in vchiq_probe()
        staging: erofs: fix error handling when failed to read compresssed data
        staging: vt6655: Fix interrupt race condition on device start up.
        staging: rtlwifi: Fix potential NULL pointer dereference of kzalloc
        staging: rtl8712: uninitialized memory in read_bbreg_hdl()
        staging: rtlwifi: rtl8822b: fix to avoid potential NULL pointer dereference
        staging: rtl8188eu: Fix potential NULL pointer dereference of kcalloc
        staging, mt7621-pci: fix build without pci support
        staging: speakup_soft: Fix alternate speech with other synths
        staging: axis-fifo: add CONFIG_OF dependency
        staging: olpc_dcon_xo_1: add missing 'const' qualifier
        staging: comedi: ni_mio_common: Fix divide-by-zero for DIO cmdtest
        staging: erofs: fix to handle error path of erofs_vmap()
        staging: mt7621-dts: update ethernet settings.
        staging: remove mt7621-eth
      32faca66