Skip to content
  1. May 29, 2020
  2. May 28, 2020
    • Guo Ren's avatar
      csky: Fixup CONFIG_DEBUG_RSEQ · f36e0aab
      Guo Ren authored
      
      
      Put the rseq_syscall check point at the prologue of the syscall
      will break the a0 ... a7. This will casue system call bug when
      DEBUG_RSEQ is enabled.
      
      So move it to the epilogue of syscall, but before syscall_trace.
      
      Signed-off-by: default avatarGuo Ren <guoren@linux.alibaba.com>
      f36e0aab
    • Guo Ren's avatar
      csky: Coding convention in entry.S · 20f69538
      Guo Ren authored
      
      
      There is no fixup or feature in the patch, we only cleanup with:
      
       - Remove unnecessary reg used (r11, r12), just use r9 & r10 &
         syscallid regs as temp useage.
       - Add _TIF_SYSCALL_WORK and _TIF_WORK_MASK to gather macros.
      
      Signed-off-by: default avatarGuo Ren <guoren@linux.alibaba.com>
      20f69538
    • Guo Ren's avatar
      csky: Fixup abiv2 syscall_trace break a4 & a5 · e0bbb538
      Guo Ren authored
      
      
      Current implementation could destory a4 & a5 when strace, so we need to get them
      from pt_regs by SAVE_ALL.
      
      Signed-off-by: default avatarGuo Ren <guoren@linux.alibaba.com>
      e0bbb538
    • Guo Ren's avatar
      csky: Fixup CONFIG_PREEMPT panic · 90089759
      Guo Ren authored
      
      
      log:
      [    0.13373200] Calibrating delay loop...
      [    0.14077600] ------------[ cut here ]------------
      [    0.14116700] WARNING: CPU: 0 PID: 0 at kernel/sched/core.c:3790 preempt_count_add+0xc8/0x11c
      [    0.14348000] DEBUG_LOCKS_WARN_ON((preempt_count() < 0))Modules linked in:
      [    0.14395100] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.6.0 #7
      [    0.14410800]
      [    0.14427400] Call Trace:
      [    0.14450700] [<807cd226>] dump_stack+0x8a/0xe4
      [    0.14473500] [<80072792>] __warn+0x10e/0x15c
      [    0.14495900] [<80072852>] warn_slowpath_fmt+0x72/0xc0
      [    0.14518600] [<800a5240>] preempt_count_add+0xc8/0x11c
      [    0.14544900] [<807ef918>] _raw_spin_lock+0x28/0x68
      [    0.14572600] [<800e0eb8>] vprintk_emit+0x84/0x2d8
      [    0.14599000] [<800e113a>] vprintk_default+0x2e/0x44
      [    0.14625100] [<800e2042>] vprintk_func+0x12a/0x1d0
      [    0.14651300] [<800e1804>] printk+0x30/0x48
      [    0.14677600] [<80008052>] lockdep_init+0x12/0xb0
      [    0.14703800] [<80002080>] start_kernel+0x558/0x7f8
      [    0.14730000] [<800052bc>] csky_start+0x58/0x94
      [    0.14756600] irq event stamp: 34
      [    0.14775100] hardirqs last  enabled at (33): [<80067370>] ret_from_exception+0x2c/0x72
      [    0.14793700] hardirqs last disabled at (34): [<800e0eae>] vprintk_emit+0x7a/0x2d8
      [    0.14812300] softirqs last  enabled at (32): [<800655b0>] __do_softirq+0x578/0x6d8
      [    0.14830800] softirqs last disabled at (25): [<8007b3b8>] irq_exit+0xec/0x128
      
      The preempt_count of reg could be destroyed after csky_do_IRQ without reload
      from memory.
      
      After reference to other architectures (arm64, riscv), we move preempt entry
      into ret_from_exception and disable irq at the beginning of
      ret_from_exception instead of RESTORE_ALL.
      
      Signed-off-by: default avatarGuo Ren <guoren@linux.alibaba.com>
      Reported-by: default avatarLu Baoquan <lu.baoquan@intellif.com>
      90089759
    • Linus Torvalds's avatar
      Merge tag 'fsnotify_for_v5.7-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs · b0c3ba31
      Linus Torvalds authored
      Pull fanotify FAN_DIR_MODIFY disabling from Jan Kara:
       "A single patch that disables FAN_DIR_MODIFY support that was merged in
        this merge window.
      
        When discussing further functionality we realized it may be more
        logical to guard it with a feature flag or to call things slightly
        differently (or maybe not) so let's not set the API in stone for now."
      
      * tag 'fsnotify_for_v5.7-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs:
        fanotify: turn off support for FAN_DIR_MODIFY
      b0c3ba31
    • Linus Torvalds's avatar
      Merge branch 'for-5.7-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup · 3301f6ae
      Linus Torvalds authored
      Pull cgroup fixes from Tejun Heo:
      
       - Reverted stricter synchronization for cgroup recursive stats which
         was prepping it for event counter usage which never got merged. The
         change was causing performation regressions in some cases.
      
       - Restore bpf-based device-cgroup operation even when cgroup1 device
         cgroup is disabled.
      
       - An out-param init fix.
      
      * 'for-5.7-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup:
        device_cgroup: Cleanup cgroup eBPF device filter code
        xattr: fix uninitialized out-param
        Revert "cgroup: Add memory barriers to plug cgroup_rstat_updated() race window"
      3301f6ae
    • Amir Goldstein's avatar
      fanotify: turn off support for FAN_DIR_MODIFY · f1793699
      Amir Goldstein authored
      FAN_DIR_MODIFY has been enabled by commit 44d705b0
      
       ("fanotify:
      report name info for FAN_DIR_MODIFY event") in 5.7-rc1. Now we are
      planning further extensions to the fanotify API and during that we
      realized that FAN_DIR_MODIFY may behave slightly differently to be more
      consistent with extensions we plan. So until we finalize these
      extensions, let's not bind our hands with exposing FAN_DIR_MODIFY to
      userland.
      
      Signed-off-by: default avatarAmir Goldstein <amir73il@gmail.com>
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      f1793699
    • Linus Torvalds's avatar
      Merge branch 'exec-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace · 006f38a1
      Linus Torvalds authored
      Pull execve fix from Eric Biederman:
       "While working on my exec cleanups I found a bug in exec that winds up
        miscomputing the ambient credentials during exec. Andy appears to have
        to been confused as to why credentials are computed for both the
        script and the interpreter
      
        From the original patch description:
      
         [3] Linux very confusingly processes both the script and the
             interpreter if applicable, for reasons that elude me. The results
             from thinking about a script's file capabilities and/or setuid
             bits are mostly discarded.
      
        The only value in struct cred that gets changed in cap_bprm_set_creds
        that I could find that might persist between the script and the
        interpreter was cap_ambient. Which is fixed with this trivial change"
      
      * 'exec-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace:
        exec: Always set cap_ambient in cap_bprm_set_creds
      006f38a1
  3. May 27, 2020
    • Dennis Kadioglu's avatar
      Input: synaptics - add a second working PNP_ID for Lenovo T470s · 642aa86e
      Dennis Kadioglu authored
      
      
      The Lenovo Thinkpad T470s I own has a different touchpad with "LEN007a"
      instead of the already included PNP ID "LEN006c". However, my touchpad
      seems to work well without any problems using RMI. So this patch adds the
      other PNP ID.
      
      Signed-off-by: default avatarDennis Kadioglu <denk@eclipso.email>
      Link: https://lore.kernel.org/r/ff770543cd53ae818363c0fe86477965@mail.eclipso.de
      
      
      Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
      642aa86e
    • Eric W. Biederman's avatar
      exec: Always set cap_ambient in cap_bprm_set_creds · a4ae32c7
      Eric W. Biederman authored
      An invariant of cap_bprm_set_creds is that every field in the new cred
      structure that cap_bprm_set_creds might set, needs to be set every
      time to ensure the fields does not get a stale value.
      
      The field cap_ambient is not set every time cap_bprm_set_creds is
      called, which means that if there is a suid or sgid script with an
      interpreter that has neither the suid nor the sgid bits set the
      interpreter should be able to accept ambient credentials.
      Unfortuantely because cap_ambient is not reset to it's original value
      the interpreter can not accept ambient credentials.
      
      Given that the ambient capability set is expected to be controlled by
      the caller, I don't think this is particularly serious.  But it is
      definitely worth fixing so the code works correctly.
      
      I have tested to verify my reading of the code is correct and the
      interpreter of a sgid can receive ambient capabilities with this
      change and cannot receive ambient capabilities without this change.
      
      Cc: stable@vger.kernel.org
      Cc: Andy Lutomirski <luto@kernel.org>
      Fixes: 58319057
      
       ("capabilities: ambient capabilities")
      Signed-off-by: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
      a4ae32c7
  4. May 26, 2020
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm · 444fc5cd
      Linus Torvalds authored
      Pull ARM fixes from Russell King:
      
       - correct value of decompressor tag size in header
      
       - fix DACR value when we have nested exceptions
      
       - fix a missing newline on a kernel message
      
       - fix mask for ptrace thumb breakpoint hook
      
      * tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm:
        ARM: 8977/1: ptrace: Fix mask for thumb breakpoint hook
        ARM: 8973/1: Add missing newline terminator to kernel message
        ARM: uaccess: fix DACR mismatch with nested exceptions
        ARM: uaccess: integrate uaccess_save and uaccess_restore
        ARM: uaccess: consolidate uaccess asm to asm/uaccess-asm.h
        ARM: 8970/1: decompressor: increase tag size
      444fc5cd
  5. May 25, 2020
    • Linus Torvalds's avatar
      Linux 5.7-rc7 · 9cb1fd0e
      Linus Torvalds authored
      9cb1fd0e
    • Linus Torvalds's avatar
      Merge tag 'efi-urgent-2020-05-24' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 98790bba
      Linus Torvalds authored
      Pull EFI fixes from Thomas Gleixner:
       "A set of EFI fixes:
      
         - Don't return a garbage screen info when EFI framebuffer is not
           available
      
         - Make the early EFI console work properly with wider fonts instead
           of drawing garbage
      
         - Prevent a memory buffer leak in allocate_e820()
      
         - Print the firmware error record properly so it can be decoded by
           users
      
         - Fix a symbol clash in the host tool build which only happens with
           newer compilers.
      
         - Add a missing check for the event log version of TPM which caused
           boot failures on several Dell systems due to an attempt to decode
           SHA-1 format with the crypto agile algorithm"
      
      * tag 'efi-urgent-2020-05-24' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        tpm: check event log version before reading final events
        efi: Pull up arch-specific prototype efi_systab_show_arch()
        x86/boot: Mark global variables as static
        efi: cper: Add support for printing Firmware Error Record Reference
        efi/libstub/x86: Avoid EFI map buffer alloc in allocate_e820()
        efi/earlycon: Fix early printk for wider fonts
        efi/libstub: Avoid returning uninitialized data from setup_graphics()
      98790bba
    • Linus Torvalds's avatar
      Merge tag 'x86-urgent-2020-05-24' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 667b6249
      Linus Torvalds authored
      Pull x86 fixes from Thomas Gleixner:
       "Two fixes for x86:
      
         - Unbreak stack dumps for inactive tasks by interpreting the special
           first frame left by __switch_to_asm() correctly.
      
           The recent change not to skip the first frame so ORC and frame
           unwinder behave in the same way caused all entries to be
           unreliable, i.e. prepended with '?'.
      
         - Use cpumask_available() instead of an implicit NULL check of a
           cpumask_var_t in mmio trace to prevent a Clang build warning"
      
      * tag 'x86-urgent-2020-05-24' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/unwind/orc: Fix unwind_get_return_address_ptr() for inactive tasks
        x86/mmiotrace: Use cpumask_available() for cpumask_var_t variables
      667b6249
    • Linus Torvalds's avatar
      Merge tag 'sched-urgent-2020-05-24' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 9e61d12b
      Linus Torvalds authored
      Pull scheduler fixes from Thomas Gleixner:
       "A set of fixes for the scheduler:
      
         - Fix handling of throttled parents in enqueue_task_fair() completely.
      
           The recent fix overlooked a corner case where the first iteration
           terminates due to an entity already being on the runqueue which
           makes the list management incomplete and later triggers the
           assertion which checks for completeness.
      
         - Fix a similar problem in unthrottle_cfs_rq().
      
         - Show the correct uclamp values in procfs which prints the effective
           value twice instead of requested and effective"
      
      * tag 'sched-urgent-2020-05-24' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        sched/fair: Fix unthrottle_cfs_rq() for leaf_cfs_rq list
        sched/debug: Fix requested task uclamp values shown in procfs
        sched/fair: Fix enqueue_task_fair() warning some more
      9e61d12b
  6. May 24, 2020
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · caffb99b
      Linus Torvalds authored
      Pull networking fixes from David Miller:
      
       1) Fix RCU warnings in ipv6 multicast router code, from Madhuparna
          Bhowmik.
      
       2) Nexthop attributes aren't being checked properly because of
          mis-initialized iterator, from David Ahern.
      
       3) Revert iop_idents_reserve() change as it caused performance
          regressions and was just working around what is really a UBSAN bug
          in the compiler. From Yuqi Jin.
      
       4) Read MAC address properly from ROM in bmac driver (double iteration
          proceeds past end of address array), from Jeremy Kerr.
      
       5) Add Microsoft Surface device IDs to r8152, from Marc Payne.
      
       6) Prevent reference to freed SKB in __netif_receive_skb_core(), from
          Boris Sukholitko.
      
       7) Fix ACK discard behavior in rxrpc, from David Howells.
      
       8) Preserve flow hash across packet scrubbing in wireguard, from Jason
          A. Donenfeld.
      
       9) Cap option length properly for SO_BINDTODEVICE in AX25, from Eric
          Dumazet.
      
      10) Fix encryption error checking in kTLS code, from Vadim Fedorenko.
      
      11) Missing BPF prog ref release in flow dissector, from Jakub Sitnicki.
      
      12) dst_cache must be used with BH disabled in tipc, from Eric Dumazet.
      
      13) Fix use after free in mlxsw driver, from Jiri Pirko.
      
      14) Order kTLS key destruction properly in mlx5 driver, from Tariq
          Toukan.
      
      15) Check devm_platform_ioremap_resource() return value properly in
          several drivers, from Tiezhu Yang.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (71 commits)
        net: smsc911x: Fix runtime PM imbalance on error
        net/mlx4_core: fix a memory leak bug.
        net: ethernet: ti: cpsw: fix ASSERT_RTNL() warning during suspend
        net: phy: mscc: fix initialization of the MACsec protocol mode
        net: stmmac: don't attach interface until resume finishes
        net: Fix return value about devm_platform_ioremap_resource()
        net/mlx5: Fix error flow in case of function_setup failure
        net/mlx5e: CT: Correctly get flow rule
        net/mlx5e: Update netdev txq on completions during closure
        net/mlx5: Annotate mutex destroy for root ns
        net/mlx5: Don't maintain a case of del_sw_func being null
        net/mlx5: Fix cleaning unmanaged flow tables
        net/mlx5: Fix memory leak in mlx5_events_init
        net/mlx5e: Fix inner tirs handling
        net/mlx5e: kTLS, Destroy key object after destroying the TIS
        net/mlx5e: Fix allowed tc redirect merged eswitch offload cases
        net/mlx5: Avoid processing commands before cmdif is ready
        net/mlx5: Fix a race when moving command interface to events mode
        net/mlx5: Add command entry handling completion
        rxrpc: Fix a memory leak in rxkad_verify_response()
        ...
      caffb99b
    • Dinghao Liu's avatar
      net: smsc911x: Fix runtime PM imbalance on error · 539d39ad
      Dinghao Liu authored
      
      
      Remove runtime PM usage counter decrement when the
      increment function has not been called to keep the
      counter balanced.
      
      Signed-off-by: default avatarDinghao Liu <dinghao.liu@zju.edu.cn>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      539d39ad
    • David S. Miller's avatar
      Merge tag 'mlx5-fixes-2020-05-22' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux · e3181e9a
      David S. Miller authored
      
      
      Saeed Mahameed says:
      
      ====================
      mlx5 fixes 2020-05-22
      
      This series introduces some fixes to mlx5 driver.
      
      Please pull and let me know if there is any problem.
      
      For -stable v4.13
         ('net/mlx5: Add command entry handling completion')
      
      For -stable v5.2
         ('net/mlx5: Fix error flow in case of function_setup failure')
         ('net/mlx5: Fix memory leak in mlx5_events_init')
      
      For -stable v5.3
         ('net/mlx5e: Update netdev txq on completions during closure')
         ('net/mlx5e: kTLS, Destroy key object after destroying the TIS')
         ('net/mlx5e: Fix inner tirs handling')
      
      For -stable v5.6
         ('net/mlx5: Fix cleaning unmanaged flow tables')
         ('net/mlx5: Fix a race when moving command interface to events mode')
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e3181e9a
    • Qiushi Wu's avatar
      net/mlx4_core: fix a memory leak bug. · febfd9d3
      Qiushi Wu authored
      In function mlx4_opreq_action(), pointer "mailbox" is not released,
      when mlx4_cmd_box() return and error, causing a memory leak bug.
      Fix this issue by going to "out" label, mlx4_free_cmd_mailbox() can
      free this pointer.
      
      Fixes: fe6f700d
      
       ("net/mlx4_core: Respond to operation request by firmware")
      Signed-off-by: default avatarQiushi Wu <wu000273@umn.edu>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      febfd9d3
    • Grygorii Strashko's avatar
      net: ethernet: ti: cpsw: fix ASSERT_RTNL() warning during suspend · 4c64b83d
      Grygorii Strashko authored
      vlan_for_each() are required to be called with rtnl_lock taken, otherwise
      ASSERT_RTNL() warning will be triggered - which happens now during System
      resume from suspend:
        cpsw_suspend()
        |- cpsw_ndo_stop()
          |- __hw_addr_ref_unsync_dev()
            |- cpsw_purge_all_mc()
               |- vlan_for_each()
                  |- ASSERT_RTNL();
      
      Hence, fix it by surrounding cpsw_ndo_stop() by rtnl_lock/unlock() calls.
      
      Fixes: 15180eca
      
       ("net: ethernet: ti: cpsw: fix vlan mcast")
      Signed-off-by: default avatarGrygorii Strashko <grygorii.strashko@ti.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4c64b83d
    • Antoine Tenart's avatar
      net: phy: mscc: fix initialization of the MACsec protocol mode · 0ddfee1f
      Antoine Tenart authored
      At the very end of the MACsec block initialization in the MSCC PHY
      driver, the MACsec "protocol mode" is set. This setting should be set
      based on the PHY id within the package, as the bank used to access the
      register used depends on this. This was not done correctly, and only the
      first bank was used leading to the two upper PHYs being unstable when
      using the VSC8584. This patch fixes it.
      
      Fixes: 1bbe0ecc
      
       ("net: phy: mscc: macsec initialization")
      Signed-off-by: default avatarAntoine Tenart <antoine.tenart@bootlin.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0ddfee1f
    • Leon Yu's avatar
      net: stmmac: don't attach interface until resume finishes · 31096c3e
      Leon Yu authored
      Commit 14b41a29
      
       ("net: stmmac: Delete txtimer in suspend") was the
      first attempt to fix a race between mod_timer() and setup_timer()
      during stmmac_resume(). However the issue still exists as the commit
      only addressed half of the issue.
      
      Same race can still happen as stmmac_resume() re-attaches interface
      way too early - even before hardware is fully initialized.  Worse,
      doing so allows network traffic to restart and stmmac_tx_timer_arm()
      being called in the middle of stmmac_resume(), which re-init tx timers
      in stmmac_init_coalesce().  timer_list will be corrupted and system
      crashes as a result of race between mod_timer() and setup_timer().
      
        systemd--1995    2.... 552950018us : stmmac_suspend: 4994
        ksoftirq-9       0..s2 553123133us : stmmac_tx_timer_arm: 2276
        systemd--1995    0.... 553127896us : stmmac_resume: 5101
        systemd--320     7...2 553132752us : stmmac_tx_timer_arm: 2276
        (sd-exec-1999    5...2 553135204us : stmmac_tx_timer_arm: 2276
        ---------------------------------
        pc : run_timer_softirq+0x468/0x5e0
        lr : run_timer_softirq+0x570/0x5e0
        Call trace:
         run_timer_softirq+0x468/0x5e0
         __do_softirq+0x124/0x398
         irq_exit+0xd8/0xe0
         __handle_domain_irq+0x6c/0xc0
         gic_handle_irq+0x60/0xb0
         el1_irq+0xb8/0x180
         arch_cpu_idle+0x38/0x230
         default_idle_call+0x24/0x3c
         do_idle+0x1e0/0x2b8
         cpu_startup_entry+0x28/0x48
         secondary_start_kernel+0x1b4/0x208
      
      Fix this by deferring netif_device_attach() to the end of
      stmmac_resume().
      
      Signed-off-by: default avatarLeon Yu <leoyu@nvidia.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      31096c3e
    • Tiezhu Yang's avatar
      net: Fix return value about devm_platform_ioremap_resource() · ef24d6c3
      Tiezhu Yang authored
      
      
      When call function devm_platform_ioremap_resource(), we should use IS_ERR()
      to check the return value and return PTR_ERR() if failed.
      
      Signed-off-by: default avatarTiezhu Yang <yangtiezhu@loongson.cn>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ef24d6c3
    • Mike Rapoport's avatar
      sparc32: fix page table traversal in srmmu_nocache_init() · 0cfc8a8d
      Mike Rapoport authored
      The srmmu_nocache_init() uses __nocache_fix() macro to add an offset to
      page table entry to access srmmu_nocache_pool.
      
      But since sparc32 has only three actual page table levels, pgd, p4d and
      pud are essentially the same thing and pgd_offset() and p4d_offset() are
      no-ops, the __nocache_fix() should be done only at PUD level.
      
      Remove __nocache_fix() for p4d_offset() and pud_offset() and keep it
      only for PUD and lower levels.
      
      Fixes: c2bc26f7
      
       ("sparc32: use PUD rather than PGD to get PMD in srmmu_nocache_init()")
      Signed-off-by: default avatarMike Rapoport <rppt@linux.ibm.com>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Anatoly Pugachev <matorola@gmail.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      0cfc8a8d
    • Linus Torvalds's avatar
      Merge branch 'akpm' (patches from Andrew) · 423b8baf
      Linus Torvalds authored
      Merge misc fixes from Andrew Morton:
       "11 fixes"
      
      * emailed patches from Andrew Morton <akpm@linux-foundation.org>:
        MAINTAINERS: add files related to kdump
        z3fold: fix use-after-free when freeing handles
        sparc32: use PUD rather than PGD to get PMD in srmmu_nocache_init()
        MAINTAINERS: update email address for Naoya Horiguchi
        sh: include linux/time_types.h for sockios
        kasan: disable branch tracing for core runtime
        selftests/vm/write_to_hugetlbfs.c: fix unused variable warning
        selftests/vm/.gitignore: add mremap_dontunmap
        rapidio: fix an error in get_user_pages_fast() error handling
        x86: bitops: fix build regression
        device-dax: don't leak kernel memory to user space after unloading kmem
      423b8baf
    • Linus Torvalds's avatar
      Merge tag 'driver-core-5.7-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core · 23f0dac8
      Linus Torvalds authored
      Pull driver core fixes from Greg KH:
       "So, turns out the kobject fix didn't quite work, so here are four
        patches that in the end, result in just two driver core fixes for
        reported issues that no one has had problems with.
      
        The kobject patch that was originally in here has now been reverted,
        as Guenter reported boot problems with it on some of his systems"
      
      * tag 'driver-core-5.7-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
        Revert "kobject: Make sure the parent does not get released before its children"
        kobject: Make sure the parent does not get released before its children
        driver core: Fix handling of SYNC_STATE_ONLY + STATELESS device links
        driver core: Fix SYNC_STATE_ONLY device link implementation
      23f0dac8
    • Linus Torvalds's avatar
      Merge tag 'char-misc-5.7-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc · 0e36fd45
      Linus Torvalds authored
      Pull char/misc fixes from Greg KH:
       "Here are some small char/misc driver fixes for 5.7-rc7 that resolve
        some reported issues. Included in here are tiny fixes for the mei,
        coresight, rtsx, ipack, and mhi drivers.
      
        All of these have been in linux-next with no reported issues"
      
      * tag 'char-misc-5.7-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
        misc: rtsx: Add short delay after exit from ASPM
        bus: mhi: core: Fix some error return code
        ipack: tpci200: fix error return code in tpci200_register()
        coresight: cti: remove incorrect NULL return check
        mei: release me_cl object reference
      0e36fd45
    • Linus Torvalds's avatar
      Merge tag 'staging-5.7-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging · 8f261041
      Linus Torvalds authored
      Pull staging/iio fixes from Greg KH:
       "Here are some small staging and IIO driver fixes for 5.7-rc7
      
        Nothing major, just a collection of IIO driver fixes for reported
        issues, and a few small staging driver fixes that people have found.
        Full details are in the shortlog.
      
        All of these have been in linux-next for a while with no reported
        issues"
      
      * tag 'staging-5.7-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
        staging: wfx: unlock on error path
        staging: greybus: Fix uninitialized scalar variable
        staging: kpc2000: fix error return code in kp2000_pcie_probe()
        iio: sca3000: Remove an erroneous 'get_device()'
        iio: adc: stm32-dfsdm: fix device used to request dma
        iio: adc: stm32-adc: fix device used to request dma
        iio: adc: ti-ads8344: Fix channel selection
        staging: iio: ad2s1210: Fix SPI reading
        iio: dac: vf610: Fix an error handling path in 'vf610_dac_probe()'
        iio: imu: st_lsm6dsx: unlock on error in st_lsm6dsx_shub_write_raw()
        iio: chemical: atlas-sensor: correct DO-SM channels
      8f261041
    • Linus Torvalds's avatar
      Merge tag 'tty-5.7-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty · d3044d7d
      Linus Torvalds authored
      Pull tty/serial fix from Greg KH:
       "Here is a single serial driver fix for 5.7-rc7. It resolves an issue
        with the SiFive serial console init sequence that was reported a
        number of times.
      
        It has been in linux-next for a while now with no reported issues"
      
      * tag 'tty-5.7-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
        tty: serial: add missing spin_lock_init for SiFive serial console
      d3044d7d
    • Linus Torvalds's avatar
      Merge tag 's390-5.7-4' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux · 9bca7c40
      Linus Torvalds authored
      Pull s390 fixes from Vasily Gorbik:
      
       - Add missing R_390_JMP_SLOT relocation type in KASLR code.
      
       - Fix set_huge_pte_at for empty ptes issue which has been uncovered
         with arch page table helper tests.
      
       - Correct initrd location for kdump kernel.
      
       - Fix s390_mmio_read/write with MIO in PCI code.
      
      * tag 's390-5.7-4' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
        s390/kaslr: add support for R_390_JMP_SLOT relocation type
        s390/mm: fix set_huge_pte_at() for empty ptes
        s390/kexec_file: fix initrd location for kdump kernel
        s390/pci: Fix s390_mmio_read/write with MIO
      9bca7c40
    • Baoquan He's avatar
      MAINTAINERS: add files related to kdump · ca6edee6
      Baoquan He authored
      
      
      Kdump is implemented based on kexec, however some files are only related
      to crash dumping and missing, add them to KDUMP entry.
      
      Signed-off-by: default avatarBaoquan He <bhe@redhat.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Acked-by: default avatarDave Young <dyoung@redhat.com>
      Link: http://lkml.kernel.org/r/20200520103633.GW5029@MiWiFi-R3L-srv
      
      
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      ca6edee6
    • Uladzislau Rezki's avatar
      z3fold: fix use-after-free when freeing handles · d8f117ab
      Uladzislau Rezki authored
      
      
      free_handle() for a foreign handle may race with inter-page compaction,
      what can lead to memory corruption.
      
      To avoid that, take write lock not read lock in free_handle to be
      synchronized with __release_z3fold_page().
      
      For example KASAN can detect it:
      
        ==================================================================
        BUG: KASAN: use-after-free in LZ4_decompress_safe+0x2c4/0x3b8
        Read of size 1 at addr ffffffc976695ca3 by task GoogleApiHandle/4121
      
        CPU: 0 PID: 4121 Comm: GoogleApiHandle Tainted: P S         OE     4.19.81-perf+ #162
        Hardware name: Sony Mobile Communications. PDX-203(KONA) (DT)
        Call trace:
           LZ4_decompress_safe+0x2c4/0x3b8
           lz4_decompress_crypto+0x3c/0x70
           crypto_decompress+0x58/0x70
           zcomp_decompress+0xd4/0x120
           ...
      
      Apart from that, initialize zhdr->mapped_count in init_z3fold_page() and
      remove "newpage" variable because it is not used anywhere.
      
      Signed-off-by: default avatarUladzislau Rezki <uladzislau.rezki@sony.com>
      Signed-off-by: default avatarVitaly Wool <vitaly.wool@konsulko.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Cc: Qian Cai <cai@lca.pw>
      Cc: Raymond Jennings <shentino@gmail.com>
      Cc: <stable@vger.kernel.org>
      Link: http://lkml.kernel.org/r/20200520082100.28876-1-vitaly.wool@konsulko.com
      
      
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      d8f117ab