Skip to content
Permalink
Tomas-Winkler/…
Switch branches/tags

Commits on Apr 11, 2021

  1. platform/x86: intel_pmc_core: export platform global reset bits via e…

    …tr3 sysfs file
    
    During PCH (platform/board) manufacturing process a global platform
    reset has to be induced in order for the configuration changes take
    the effect upon following platform reset. This is an internal platform
    state and is not intended to be used in the regular platform resets.
    The setting is exposed via ETR3 (Extended Test Mode Register 3).
    After the manufacturing process is completed the register cannot be
    written anymore and is hardware locked.
    This setting was commonly done by accessing PMC registers via /dev/mem
    but due to security concerns /dev/mem access is much more restricted,
    hence the reason for exposing this setting via the dedicated sysfs
    interface.
    To prevent post manufacturing abuse the register is protected
    by hardware locking and the file is set to read-only mode via is_visible
    handler.
    
    The register in MMIO space is defined for Cannon Lake and newer PCHs.
    
    Cc: Hans de Goede <hdegoede@redhat.com>
    Cc: David E Box <david.e.box@intel.com>
    Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
    Signed-off-by: Tamar Mashiah <tamar.mashiah@intel.com>
    Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
    tmashiah authored and intel-lab-lkp committed Apr 11, 2021

Commits on Apr 10, 2021

  1. Merge branch 'for-5.12-fixes' of git://git.kernel.org/pub/scm/linux/k…

    …ernel/git/dennis/percpu
    
    Pull percpu fix from Dennis Zhou:
     "This contains a fix for sporadically failing atomic percpu
      allocations.
    
      I only caught it recently while I was reviewing a new series [1] and
      simultaneously saw reports by btrfs in xfstests [2] and [3].
    
      In v5.9, memcg accounting was extended to percpu done by adding a
      second type of chunk. I missed an interaction with the free page float
      count used to ensure we can support atomic allocations. If one type of
      chunk has no free pages, but the other has enough to satisfy the free
      page float requirement, we will not repopulate the free pages for the
      former type of chunk. This led to the sporadically failing atomic
      allocations"
    
    Link: https://lore.kernel.org/linux-mm/20210324190626.564297-1-guro@fb.com/ [1]
    Link: https://lore.kernel.org/linux-mm/20210401185158.3275.409509F4@e16-tech.com/ [2]
    Link: https://lore.kernel.org/linux-mm/CAL3q7H5RNBjCi708GH7jnczAOe0BLnacT9C+OBgA-Dx9jhB6SQ@mail.gmail.com/ [3]
    
    * 'for-5.12-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/dennis/percpu:
      percpu: make pcpu_nr_empty_pop_pages per chunk type
    torvalds committed Apr 10, 2021
  2. Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/g…

    …it/jejb/scsi
    
    Pull SCSI fixes from James Bottomley:
     "Seven fixes, all in drivers.
    
      The hpsa three are the most extensive and the most problematic: it's a
      packed structure misalignment that oopses on ia64 but looks like it
      would also oops on quite a few non-x86 architectures.
    
      The pm80xx is a regression and the rest are bug fixes for patches in
      the misc tree"
    
    * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
      scsi: scsi_transport_srp: Don't block target in SRP_PORT_LOST state
      scsi: target: iscsi: Fix zero tag inside a trace event
      scsi: pm80xx: Fix chip initialization failure
      scsi: ufs: core: Fix wrong Task Tag used in task management request UPIUs
      scsi: ufs: core: Fix task management request completion timeout
      scsi: hpsa: Add an assert to prevent __packed reintroduction
      scsi: hpsa: Fix boot on ia64 (atomic_t alignment)
      scsi: hpsa: Use __packed on individual structs, not header-wide
    torvalds committed Apr 10, 2021
  3. Merge tag 'powerpc-5.12-6' of git://git.kernel.org/pub/scm/linux/kern…

    …el/git/powerpc/linux
    
    Pull powerpc fixes from Michael Ellerman:
     "Some some more powerpc fixes for 5.12:
    
       - Fix an oops triggered by ptrace when CONFIG_PPC_FPU_REGS=n
    
       - Fix an oops on sigreturn when the VDSO is unmapped on 32-bit
    
       - Fix vdso_wrapper.o not being rebuilt everytime vdso.so is rebuilt
    
      Thanks to Christophe Leroy"
    
    * tag 'powerpc-5.12-6' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
      powerpc/vdso: Make sure vdso_wrapper.o is rebuilt everytime vdso.so is rebuilt
      powerpc/signal32: Fix Oops on sigreturn with unmapped VDSO
      powerpc/ptrace: Don't return error when getting/setting FP regs without CONFIG_PPC_FPU_REGS
    torvalds committed Apr 10, 2021
  4. Merge tag 'driver-core-5.12-rc7' of git://git.kernel.org/pub/scm/linu…

    …x/kernel/git/gregkh/driver-core
    
    Pull driver core fix from Greg KH:
     "Here is a single driver core fix for 5.12-rc7 to resolve a reported
      problem that caused some devices to lockup when booting. It has been
      in linux-next with no reported issues"
    
    * tag 'driver-core-5.12-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
      driver core: Fix locking bug in deferred_probe_timeout_work_func()
    torvalds committed Apr 10, 2021
  5. Merge tag 'usb-5.12-rc7' of git://git.kernel.org/pub/scm/linux/kernel…

    …/git/gregkh/usb
    
    Pull USB/Thunderbolt fixes from Greg KH:
     "Here are a few small USB and Thunderbolt driver fixes for 5.12-rc7 for
      reported issues:
    
       - thunderbolt leaks and off-by-one fix
    
       - cdnsp deque fix
    
       - usbip fixes for syzbot-reported issues
    
      All have been in linux-next with no reported problems"
    
    * tag 'usb-5.12-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
      usbip: synchronize event handler with sysfs code paths
      usbip: vudc synchronize sysfs code paths
      usbip: stub-dev synchronize sysfs code paths
      usbip: add sysfs_lock to synchronize sysfs code paths
      thunderbolt: Fix off by one in tb_port_find_retimer()
      thunderbolt: Fix a leak in tb_retimer_add()
      usb: cdnsp: Fixes issue with dequeuing requests after disabling endpoint
    torvalds committed Apr 10, 2021
  6. Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/…

    …kernel/git/wsa/linux
    
    Pull i2c fixes from Wolfram Sang:
     "A mixture of driver and documentation bugfixes for I2C"
    
    * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
      i2c: imx: mention Oleksij as maintainer of the binding docs
      i2c: exynos5: correct top kerneldoc
      i2c: designware: Adjust bus_freq_hz when refuse high speed mode set
      i2c: hix5hd2: use the correct HiSilicon copyright
      i2c: gpio: update email address in binding docs
      i2c: imx: drop me as maintainer of binding docs
      i2c: stm32f4: Mundane typo fix
      I2C: JZ4780: Fix bug for Ingenic X1000.
      i2c: turn recovery error on init to debug
    torvalds committed Apr 10, 2021
  7. Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux…

    …/kernel/git/clk/linux
    
    Pull clk fixes from Stephen Boyd:
     "Here's the latest pile of clk driver and clk framework fixes for this
      release:
    
       - Two clk framework fixes for a long standing issue in
         clk_notifier_{register,unregister}() where we used a pointer that
         was for a struct containing a list head when there was no container
         struct
    
       - A compile warning fix for socfpga that's good to have
    
       - A double free problem with devm registered fixed factor clks
    
       - One last fix to the Qualcomm camera clk driver to use the right clk
         ops so clks don't get stuck and stop working because the firmware
         takes them for a ride"
    
    * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux:
      clk: fixed: fix double free in resource managed fixed-factor clock
      clk: fix invalid usage of list cursor in unregister
      clk: fix invalid usage of list cursor in register
      clk: qcom: camcc: Update the clock ops for the SC7180
      clk: socfpga: fix iomem pointer cast on 64-bit
    torvalds committed Apr 10, 2021
  8. Merge tag 'perf-tools-fixes-for-v5.12-2020-04-09' of git://git.kernel…

    ….org/pub/scm/linux/kernel/git/acme/linux
    
    Pull perf tool fixes from Arnaldo Carvalho de Melo:
    
     - Fix wrong LBR block sorting in 'perf report'
    
     - Fix 'perf inject' repipe usage when consuming perf.data files
    
     - Avoid potential buffer overrun when decoding ARM SPE hardware tracing
       packets, bug found using a fuzzer
    
    * tag 'perf-tools-fixes-for-v5.12-2020-04-09' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux:
      perf arm-spe: Avoid potential buffer overrun
      perf report: Fix wrong LBR block sorting
      perf inject: Fix repipe usage
    torvalds committed Apr 10, 2021
  9. Merge branch 'akpm' (patches from Andrew)

    Merge misc fixes from Andrew Morton:
     "14 patches.
    
      Subsystems affected by this patch series: mm (kasan, gup, pagecache,
      and kfence), MAINTAINERS, mailmap, nds32, gcov, ocfs2, ia64, and lib"
    
    * emailed patches from Andrew Morton <akpm@linux-foundation.org>:
      lib: fix kconfig dependency on ARCH_WANT_FRAME_POINTERS
      kfence, x86: fix preemptible warning on KPTI-enabled systems
      lib/test_kasan_module.c: suppress unused var warning
      kasan: fix conflict with page poisoning
      fs: direct-io: fix missing sdio->boundary
      ia64: fix user_stack_pointer() for ptrace()
      ocfs2: fix deadlock between setattr and dio_end_io_write
      gcov: re-fix clang-11+ support
      nds32: flush_dcache_page: use page_mapping_file to avoid races with swapoff
      mm/gup: check page posion status for coredump.
      .mailmap: fix old email addresses
      mailmap: update email address for Jordan Crouse
      treewide: change my e-mail address, fix my name
      MAINTAINERS: update CZ.NIC's Turris information
    torvalds committed Apr 10, 2021

Commits on Apr 9, 2021

  1. Merge tag 'net-5.12-rc7' of git://git.kernel.org/pub/scm/linux/kernel…

    …/git/netdev/net
    
    Pull networking fixes from Jakub Kicinski:
     "Networking fixes for 5.12-rc7, including fixes from can, ipsec,
      mac80211, wireless, and bpf trees.
    
      No scary regressions here or in the works, but small fixes for 5.12
      changes keep coming.
    
      Current release - regressions:
    
       - virtio: do not pull payload in skb->head
    
       - virtio: ensure mac header is set in virtio_net_hdr_to_skb()
    
       - Revert "net: correct sk_acceptq_is_full()"
    
       - mptcp: revert "mptcp: provide subflow aware release function"
    
       - ethernet: lan743x: fix ethernet frame cutoff issue
    
       - dsa: fix type was not set for devlink port
    
       - ethtool: remove link_mode param and derive link params from driver
    
       - sched: htb: fix null pointer dereference on a null new_q
    
       - wireless: iwlwifi: Fix softirq/hardirq disabling in
         iwl_pcie_enqueue_hcmd()
    
       - wireless: iwlwifi: fw: fix notification wait locking
    
       - wireless: brcmfmac: p2p: Fix deadlock introduced by avoiding the
         rtnl dependency
    
      Current release - new code bugs:
    
       - napi: fix hangup on napi_disable for threaded napi
    
       - bpf: take module reference for trampoline in module
    
       - wireless: mt76: mt7921: fix airtime reporting and related tx hangs
    
       - wireless: iwlwifi: mvm: rfi: don't lock mvm->mutex when sending
         config command
    
      Previous releases - regressions:
    
       - rfkill: revert back to old userspace API by default
    
       - nfc: fix infinite loop, refcount & memory leaks in LLCP sockets
    
       - let skb_orphan_partial wake-up waiters
    
       - xfrm/compat: Cleanup WARN()s that can be user-triggered
    
       - vxlan, geneve: do not modify the shared tunnel info when PMTU
         triggers an ICMP reply
    
       - can: fix msg_namelen values depending on CAN_REQUIRED_SIZE
    
       - can: uapi: mark union inside struct can_frame packed
    
       - sched: cls: fix action overwrite reference counting
    
       - sched: cls: fix err handler in tcf_action_init()
    
       - ethernet: mlxsw: fix ECN marking in tunnel decapsulation
    
       - ethernet: nfp: Fix a use after free in nfp_bpf_ctrl_msg_rx
    
       - ethernet: i40e: fix receiving of single packets in xsk zero-copy
         mode
    
       - ethernet: cxgb4: avoid collecting SGE_QBASE regs during traffic
    
      Previous releases - always broken:
    
       - bpf: Refuse non-O_RDWR flags in BPF_OBJ_GET
    
       - bpf: Refcount task stack in bpf_get_task_stack
    
       - bpf, x86: Validate computation of branch displacements
    
       - ieee802154: fix many similar syzbot-found bugs
           - fix NULL dereferences in netlink attribute handling
           - reject unsupported operations on monitor interfaces
           - fix error handling in llsec_key_alloc()
    
       - xfrm: make ipv4 pmtu check honor ip header df
    
       - xfrm: make hash generation lock per network namespace
    
       - xfrm: esp: delete NETIF_F_SCTP_CRC bit from features for esp
         offload
    
       - ethtool: fix incorrect datatype in set_eee ops
    
       - xdp: fix xdp_return_frame() kernel BUG throw for page_pool memory
         model
    
       - openvswitch: fix send of uninitialized stack memory in ct limit
         reply
    
      Misc:
    
       - udp: add get handling for UDP_GRO sockopt"
    
    * tag 'net-5.12-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (182 commits)
      net: fix hangup on napi_disable for threaded napi
      net: hns3: Trivial spell fix in hns3 driver
      lan743x: fix ethernet frame cutoff issue
      net: ipv6: check for validity before dereferencing cfg->fc_nlinfo.nlh
      net: dsa: lantiq_gswip: Configure all remaining GSWIP_MII_CFG bits
      net: dsa: lantiq_gswip: Don't use PHY auto polling
      net: sched: sch_teql: fix null-pointer dereference
      ipv6: report errors for iftoken via netlink extack
      net: sched: fix err handler in tcf_action_init()
      net: sched: fix action overwrite reference counting
      Revert "net: sched: bump refcount for new action in ACT replace mode"
      ice: fix memory leak of aRFS after resuming from suspend
      i40e: Fix sparse warning: missing error code 'err'
      i40e: Fix sparse error: 'vsi->netdev' could be null
      i40e: Fix sparse error: uninitialized symbol 'ring'
      i40e: Fix sparse errors in i40e_txrx.c
      i40e: Fix parameters in aq_get_phy_register()
      nl80211: fix beacon head validation
      bpf, x86: Validate computation of branch displacements for x86-32
      bpf, x86: Validate computation of branch displacements for x86-64
      ...
    torvalds committed Apr 9, 2021
  2. Merge tag 'io_uring-5.12-2021-04-09' of git://git.kernel.dk/linux-block

    Pull io_uring fixes from Jens Axboe:
     "Two minor fixups for the reissue logic, and one for making sure that
      unbounded work is canceled on io-wq exit"
    
    * tag 'io_uring-5.12-2021-04-09' of git://git.kernel.dk/linux-block:
      io-wq: cancel unbounded works on io-wq destroy
      io_uring: fix rw req completion
      io_uring: clear F_REISSUE right after getting it
    torvalds committed Apr 9, 2021
  3. lib: fix kconfig dependency on ARCH_WANT_FRAME_POINTERS

    When LATENCYTOP, LOCKDEP, or FAULT_INJECTION_STACKTRACE_FILTER is
    enabled and ARCH_WANT_FRAME_POINTERS is disabled, Kbuild gives a warning
    such as:
    
      WARNING: unmet direct dependencies detected for FRAME_POINTER
        Depends on [n]: DEBUG_KERNEL [=y] && (M68K || UML || SUPERH) || ARCH_WANT_FRAME_POINTERS [=n] || MCOUNT [=n]
        Selected by [y]:
        - LATENCYTOP [=y] && DEBUG_KERNEL [=y] && STACKTRACE_SUPPORT [=y] && PROC_FS [=y] && !MIPS && !PPC && !S390 && !MICROBLAZE && !ARM && !ARC && !X86
    
    Depending on ARCH_WANT_FRAME_POINTERS causes a recursive dependency
    error.  ARCH_WANT_FRAME_POINTERS is to be selected by the architecture,
    and is not supposed to be overridden by other config options.
    
    Link: https://lkml.kernel.org/r/20210329165329.27994-1-julianbraha@gmail.com
    Signed-off-by: Julian Braha <julianbraha@gmail.com>
    Cc: Andreas Schwab <schwab@linux-m68k.org>
    Cc: Geert Uytterhoeven <geert@linux-m68k.org>
    Cc: Necip Fazil Yildiran <fazilyildiran@gmail.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    julianbraha authored and torvalds committed Apr 9, 2021
  4. kfence, x86: fix preemptible warning on KPTI-enabled systems

    On systems with KPTI enabled, we can currently observe the following
    warning:
    
      BUG: using smp_processor_id() in preemptible
      caller is invalidate_user_asid+0x13/0x50
      CPU: 6 PID: 1075 Comm: dmesg Not tainted 5.12.0-rc4-gda4a2b1a5479-kfence_1+ #1
      Hardware name: Hewlett-Packard HP Pro 3500 Series/2ABF, BIOS 8.11 10/24/2012
      Call Trace:
       dump_stack+0x7f/0xad
       check_preemption_disabled+0xc8/0xd0
       invalidate_user_asid+0x13/0x50
       flush_tlb_one_kernel+0x5/0x20
       kfence_protect+0x56/0x80
       ...
    
    While it normally makes sense to require preemption to be off, so that
    the expected CPU's TLB is flushed and not another, in our case it really
    is best-effort (see comments in kfence_protect_page()).
    
    Avoid the warning by disabling preemption around flush_tlb_one_kernel().
    
    Link: https://lore.kernel.org/lkml/YGIDBAboELGgMgXy@elver.google.com/
    Link: https://lkml.kernel.org/r/20210330065737.652669-1-elver@google.com
    Signed-off-by: Marco Elver <elver@google.com>
    Reported-by: Tomi Sarvela <tomi.p.sarvela@intel.com>
    Cc: Alexander Potapenko <glider@google.com>
    Cc: Dmitry Vyukov <dvyukov@google.com>
    Cc: Andrey Konovalov <andreyknvl@google.com>
    Cc: Jann Horn <jannh@google.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    melver authored and torvalds committed Apr 9, 2021
  5. lib/test_kasan_module.c: suppress unused var warning

    Local `unused' is intentionally unused - it is there to suppress
    __must_check warnings.
    
    Reported-by: kernel test robot <lkp@intel.com>
    Link: https://lkml.kernel.org/r/202104050216.HflRxfJm-lkp@intel.com
    Cc: Marco Elver <elver@google.com>
    Cc: Alexander Potapenko <glider@google.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    akpm00 authored and torvalds committed Apr 9, 2021
  6. kasan: fix conflict with page poisoning

    When page poisoning is enabled, it accesses memory that is marked as
    poisoned by KASAN, which leas to false-positive KASAN reports.
    
    Suppress the reports by adding KASAN annotations to unpoison_page()
    (poison_page() already has them).
    
    Link: https://lkml.kernel.org/r/2dc799014d31ac13fd97bd906bad33e16376fc67.1617118501.git.andreyknvl@google.com
    Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
    Cc: Alexander Potapenko <glider@google.com>
    Cc: Marco Elver <elver@google.com>
    Cc: Dmitry Vyukov <dvyukov@google.com>
    Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>
    Cc: Andrey Konovalov <andreyknvl@gmail.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    xairy authored and torvalds committed Apr 9, 2021
  7. fs: direct-io: fix missing sdio->boundary

    I encountered a hung task issue, but not a performance one.  I run DIO
    on a device (need lba continuous, for example open channel ssd), maybe
    hungtask in below case:
    
      DIO:						Checkpoint:
      get addr A(at boundary), merge into BIO,
      no submit because boundary missing
    						flush dirty data(get addr A+1), wait IO(A+1)
    						writeback timeout, because DIO(A) didn't submit
      get addr A+2 fail, because checkpoint is doing
    
    dio_send_cur_page() may clear sdio->boundary, so prevent it from missing
    a boundary.
    
    Link: https://lkml.kernel.org/r/20210322042253.38312-1-jack.qiu@huawei.com
    Fixes: b1058b9 ("direct-io: submit bio after boundary buffer is added to it")
    Signed-off-by: Jack Qiu <jack.qiu@huawei.com>
    Reviewed-by: Jan Kara <jack@suse.cz>
    Cc: <stable@vger.kernel.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Jack Qiu authored and torvalds committed Apr 9, 2021
  8. ia64: fix user_stack_pointer() for ptrace()

    ia64 has two stacks:
    
     - memory stack (or stack), pointed at by by r12
    
     - register backing store (register stack), pointed at by
       ar.bsp/ar.bspstore with complications around dirty
       register frame on CPU.
    
    In [1] Dmitry noticed that PTRACE_GET_SYSCALL_INFO returns the register
    stack instead memory stack.
    
    The bug comes from the fact that user_stack_pointer() and
    current_user_stack_pointer() don't return the same register:
    
      ulong user_stack_pointer(struct pt_regs *regs) { return regs->ar_bspstore; }
      #define current_user_stack_pointer() (current_pt_regs()->r12)
    
    The change gets both back in sync.
    
    I think ptrace(PTRACE_GET_SYSCALL_INFO) is the only affected user by
    this bug on ia64.
    
    The change fixes 'rt_sigreturn.gen.test' strace test where it was
    observed initially.
    
    Link: https://bugs.gentoo.org/769614 [1]
    Link: https://lkml.kernel.org/r/20210331084447.2561532-1-slyfox@gentoo.org
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
    Reported-by: Dmitry V. Levin <ldv@altlinux.org>
    Cc: Oleg Nesterov <oleg@redhat.com>
    Cc: <stable@vger.kernel.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Sergei Trofimovich authored and torvalds committed Apr 9, 2021
  9. ocfs2: fix deadlock between setattr and dio_end_io_write

    The following deadlock is detected:
    
      truncate -> setattr path is waiting for pending direct IO to be done (inode->i_dio_count become zero) with inode->i_rwsem held (down_write).
    
      PID: 14827  TASK: ffff881686a9af80  CPU: 20  COMMAND: "ora_p005_hrltd9"
       #0  __schedule at ffffffff818667cc
       #1  schedule at ffffffff81866de6
       #2  inode_dio_wait at ffffffff812a2d04
       #3  ocfs2_setattr at ffffffffc05f322e [ocfs2]
       #4  notify_change at ffffffff812a5a09
       #5  do_truncate at ffffffff812808f5
       torvalds#6  do_sys_ftruncate.constprop.18 at ffffffff81280cf2
       torvalds#7  sys_ftruncate at ffffffff81280d8e
       torvalds#8  do_syscall_64 at ffffffff81003949
       torvalds#9  entry_SYSCALL_64_after_hwframe at ffffffff81a001ad
    
    dio completion path is going to complete one direct IO (decrement
    inode->i_dio_count), but before that it hung at locking inode->i_rwsem:
    
       #0  __schedule+700 at ffffffff818667cc
       #1  schedule+54 at ffffffff81866de6
       #2  rwsem_down_write_failed+536 at ffffffff8186aa28
       #3  call_rwsem_down_write_failed+23 at ffffffff8185a1b7
       #4  down_write+45 at ffffffff81869c9d
       #5  ocfs2_dio_end_io_write+180 at ffffffffc05d5444 [ocfs2]
       torvalds#6  ocfs2_dio_end_io+85 at ffffffffc05d5a85 [ocfs2]
       torvalds#7  dio_complete+140 at ffffffff812c873c
       torvalds#8  dio_aio_complete_work+25 at ffffffff812c89f9
       torvalds#9  process_one_work+361 at ffffffff810b1889
      torvalds#10  worker_thread+77 at ffffffff810b233d
      torvalds#11  kthread+261 at ffffffff810b7fd5
      torvalds#12  ret_from_fork+62 at ffffffff81a0035e
    
    Thus above forms ABBA deadlock.  The same deadlock was mentioned in
    upstream commit 28f5a8a ("ocfs2: should wait dio before inode lock
    in ocfs2_setattr()").  It seems that that commit only removed the
    cluster lock (the victim of above dead lock) from the ABBA deadlock
    party.
    
    End-user visible effects: Process hang in truncate -> ocfs2_setattr path
    and other processes hang at ocfs2_dio_end_io_write path.
    
    This is to fix the deadlock itself.  It removes inode_lock() call from
    dio completion path to remove the deadlock and add ip_alloc_sem lock in
    setattr path to synchronize the inode modifications.
    
    [wen.gang.wang@oracle.com: remove the "had_alloc_lock" as suggested]
      Link: https://lkml.kernel.org/r/20210402171344.1605-1-wen.gang.wang@oracle.com
    
    Link: https://lkml.kernel.org/r/20210331203654.3911-1-wen.gang.wang@oracle.com
    Signed-off-by: Wengang Wang <wen.gang.wang@oracle.com>
    Reviewed-by: Joseph Qi <joseph.qi@linux.alibaba.com>
    Cc: Mark Fasheh <mark@fasheh.com>
    Cc: Joel Becker <jlbec@evilplan.org>
    Cc: Junxiao Bi <junxiao.bi@oracle.com>
    Cc: Changwei Ge <gechangwei@live.cn>
    Cc: Gang He <ghe@suse.com>
    Cc: Jun Piao <piaojun@huawei.com>
    Cc: <stable@vger.kernel.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Wengang Wang authored and torvalds committed Apr 9, 2021
  10. gcov: re-fix clang-11+ support

    LLVM changed the expected function signature for llvm_gcda_emit_function()
    in the clang-11 release.  Users of clang-11 or newer may have noticed
    their kernels producing invalid coverage information:
    
      $ llvm-cov gcov -a -c -u -f -b <input>.gcda -- gcno=<input>.gcno
      1 <func>: checksum mismatch, \
        (<lineno chksum A>, <cfg chksum B>) != (<lineno chksum A>, <cfg chksum C>)
      2 Invalid .gcda File!
      ...
    
    Fix up the function signatures so calling this function interprets its
    parameters correctly and computes the correct cfg checksum.  In
    particular, in clang-11, the additional checksum is no longer optional.
    
    Link: https://reviews.llvm.org/rG25544ce2df0daa4304c07e64b9c8b0f7df60c11d
    Link: https://lkml.kernel.org/r/20210408184631.1156669-1-ndesaulniers@google.com
    Reported-by: Prasad Sodagudi <psodagud@quicinc.com>
    Tested-by: Prasad Sodagudi <psodagud@quicinc.com>
    Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
    Reviewed-by: Nathan Chancellor <nathan@kernel.org>
    Cc: <stable@vger.kernel.org>	[5.4+]
    
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    nickdesaulniers authored and torvalds committed Apr 9, 2021
  11. nds32: flush_dcache_page: use page_mapping_file to avoid races with s…

    …wapoff
    
    Commit cb9f753 ("mm: fix races between swapoff and flush dcache")
    updated flush_dcache_page implementations on several architectures to
    use page_mapping_file() in order to avoid races between page_mapping()
    and swapoff().
    
    This update missed arch/nds32 and there is a possibility of a race
    there.
    
    Replace page_mapping() with page_mapping_file() in nds32 implementation
    of flush_dcache_page().
    
    Link: https://lkml.kernel.org/r/20210330175126.26500-1-rppt@kernel.org
    Fixes: cb9f753 ("mm: fix races between swapoff and flush dcache")
    Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
    Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>
    Acked-by: Greentime Hu <green.hu@gmail.com>
    Cc: Huang Ying <ying.huang@intel.com>
    Cc: Nick Hu <nickhu@andestech.com>
    Cc: Vincent Chen <deanbo422@gmail.com>
    Cc: <stable@vger.kernel.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    rppt authored and torvalds committed Apr 9, 2021
  12. mm/gup: check page posion status for coredump.

    When we do coredump for user process signal, this may be an SIGBUS signal
    with BUS_MCEERR_AR or BUS_MCEERR_AO code, which means this signal is
    resulted from ECC memory fail like SRAR or SRAO, we expect the memory
    recovery work is finished correctly, then the get_dump_page() will not
    return the error page as its process pte is set invalid by
    memory_failure().
    
    But memory_failure() may fail, and the process's related pte may not be
    correctly set invalid, for current code, we will return the poison page,
    get it dumped, and then lead to system panic as its in kernel code.
    
    So check the poison status in get_dump_page(), and if TRUE, return NULL.
    
    There maybe other scenario that is also better to check the posion status
    and not to panic, so make a wrapper for this check, Thanks to David's
    suggestion(<david@redhat.com>).
    
    [akpm@linux-foundation.org: s/0/false/]
    [yaoaili@kingsoft.com: is_page_poisoned() arg cannot be null, per Matthew]
    
    Link: https://lkml.kernel.org/r/20210322115233.05e4e82a@alex-virtual-machine
    Link: https://lkml.kernel.org/r/20210319104437.6f30e80d@alex-virtual-machine
    Signed-off-by: Aili Yao <yaoaili@kingsoft.com>
    Cc: David Hildenbrand <david@redhat.com>
    Cc: Matthew Wilcox <willy@infradead.org>
    Cc: Naoya Horiguchi <naoya.horiguchi@nec.com>
    Cc: Oscar Salvador <osalvador@suse.de>
    Cc: Mike Kravetz <mike.kravetz@oracle.com>
    Cc: Aili Yao <yaoaili@kingsoft.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Aili Yao authored and torvalds committed Apr 9, 2021
  13. .mailmap: fix old email addresses

    Update Nick & Nadia's old addresses.
    
    Link: https://lkml.kernel.org/r/20210406134036.GQ2531743@casper.infradead.org
    Signed-off-by: Matthew Wilcox <willy@infradead.org>
    Cc: Nicholas Piggin <npiggin@gmail.com>
    Cc: Nadia Yvette Chambers <nyc@holomorphy.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Matthew Wilcox authored and torvalds committed Apr 9, 2021
  14. mailmap: update email address for Jordan Crouse

    jcrouse at codeaurora.org has started bouncing.  Redirect to a more
    permanent address.
    
    Link: https://lkml.kernel.org/r/20210325143700.1490518-1-jordan@cosmicpenguin.net
    Signed-off-by: Jordan Crouse <jordan@cosmicpenguin.net>
    Cc: Alexander Lobakin <alobakin@pm.me>
    Cc: Jonathan Corbet <corbet@lwn.net>
    Cc: Kees Cook <keescook@chromium.org>
    Cc: Miguel Ojeda <ojeda@kernel.org>
    Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    CosmicPenguin authored and torvalds committed Apr 9, 2021
  15. treewide: change my e-mail address, fix my name

    Change my e-mail address to kabel@kernel.org, and fix my name in
    non-code parts (add diacritical mark).
    
    Link: https://lkml.kernel.org/r/20210325171123.28093-2-kabel@kernel.org
    Signed-off-by: Marek Behún <kabel@kernel.org>
    Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com>
    Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Cc: Jassi Brar <jassisinghbrar@gmail.com>
    Cc: Linus Walleij <linus.walleij@linaro.org>
    Cc: Pavel Machek <pavel@ucw.cz>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    elkablo authored and torvalds committed Apr 9, 2021
  16. MAINTAINERS: update CZ.NIC's Turris information

    Add all the files maintained by Turris team, not only for MOX, but also
    for Omnia.  Change website.
    
    Link: https://lkml.kernel.org/r/20210325171123.28093-1-kabel@kernel.org
    Signed-off-by: Marek Behún <kabel@kernel.org>
    Cc: Pavel Machek <pavel@ucw.cz>
    Cc: Jassi Brar <jassisinghbrar@gmail.com>
    Cc: Linus Walleij <linus.walleij@linaro.org>
    Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com>
    Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    elkablo authored and torvalds committed Apr 9, 2021
  17. Merge tag 'devicetree-fixes-for-5.12-2' of git://git.kernel.org/pub/s…

    …cm/linux/kernel/git/robh/linux
    
    Pull devicetree fixes from Rob Herring:
    
     - Fix fw_devlink failure with ".*,nr-gpios" properties
    
     - Doc link reference fixes from Mauro
    
     - Fixes for unaligned FDT handling found on OpenRisc. First, avoid
       crash with better error handling when unflattening an unaligned FDT.
       Second, fix memory allocations for FDTs to ensure alignment.
    
    * tag 'devicetree-fixes-for-5.12-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
      of: property: fw_devlink: do not link ".*,nr-gpios"
      dt-bindings:iio:adc: update motorola,cpcap-adc.yaml reference
      dt-bindings: fix references for iio-bindings.txt
      dt-bindings: don't use ../dir for doc references
      of: unittest: overlay: ensure proper alignment of copied FDT
      of: properly check for error returned by fdt_get_name()
    torvalds committed Apr 9, 2021
  18. Merge tag 'drm-fixes-2021-04-10' of git://anongit.freedesktop.org/drm…

    …/drm
    
    Pull drm fixes from Dave Airlie:
     "Was relatively quiet this week, but still a few pulls came in, pretty
      much small fixes across the board, a couple of regression fixes in the
      amdgpu/radeon code, msm has a few minor fixes across the board, a
      panel regression fix also.
    
      amdgpu:
       - DCN3 fix
       - Fix CAC setting regression for TOPAZ
       - Fix ttm regression
    
      radeon:
       - Fix ttm regression
    
      msm:
       - a5xx/a6xx timestamp fix
       - microcode version check
       - fail path fix
       - block programming fix
       - error removal fix
    
      i915:
       - Fix invalid access to ACPI _DSM objects
    
      xen:
       - Fix use-after-free in xen
       - minor duplicate defintion cleanup
    
      vc4:
       - Reduce fifo threshold on hvs4 to fix a fifo full error
       - minor redunantant assignment cleanup
    
      panel:
       - Disable TE support for Droid4 and N950"
    
    * tag 'drm-fixes-2021-04-10' of git://anongit.freedesktop.org/drm/drm:
      drm/vc4: crtc: Reduce PV fifo threshold on hvs4
      drm/vc4: plane: Remove redundant assignment
      drm/amdgpu/smu7: fix CAC setting on TOPAZ
      drm/radeon: Fix size overflow
      drm/amdgpu: Fix size overflow
      drm/i915: Fix invalid access to ACPI _DSM objects
      drm/amd/display: Add missing mask for DCN3
      drm/panel: panel-dsi-cm: disable TE for now
      drm/msm/disp/dpu1: program 3d_merge only if block is attached
      drm/msm: a6xx: fix version check for the A650 SQE microcode
      drm/msm: Fix a5xx/a6xx timestamps
      drm/msm: Fix removal of valid error case when checking speed_bin
      drm/msm: Set drvdata to NULL when msm_drm_init() fails
      drivers: gpu: drm: xen_drm_front_drm_info is declared twice
      gpu/xen: Fix a use after free in xen_drm_drv_init
    torvalds committed Apr 9, 2021
  19. net: fix hangup on napi_disable for threaded napi

    napi_disable() is subject to an hangup, when the threaded
    mode is enabled and the napi is under heavy traffic.
    
    If the relevant napi has been scheduled and the napi_disable()
    kicks in before the next napi_threaded_wait() completes - so
    that the latter quits due to the napi_disable_pending() condition,
    the existing code leaves the NAPI_STATE_SCHED bit set and the
    napi_disable() loop waiting for such bit will hang.
    
    This patch addresses the issue by dropping the NAPI_STATE_DISABLE
    bit test in napi_thread_wait(). The later napi_threaded_poll()
    iteration will take care of clearing the NAPI_STATE_SCHED.
    
    This also addresses a related problem reported by Jakub:
    before this patch a napi_disable()/napi_enable() pair killed
    the napi thread, effectively disabling the threaded mode.
    On the patched kernel napi_disable() simply stops scheduling
    the relevant thread.
    
    v1 -> v2:
      - let the main napi_thread_poll() loop clear the SCHED bit
    
    Reported-by: Jakub Kicinski <kuba@kernel.org>
    Fixes: 29863d4 ("net: implement threaded-able napi poll loop support")
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    Reviewed-by: Eric Dumazet <edumazet@google.com>
    Link: https://lore.kernel.org/r/883923fa22745a9589e8610962b7dc59df09fb1f.1617981844.git.pabeni@redhat.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Paolo Abeni authored and Jakub Kicinski committed Apr 9, 2021
  20. net: hns3: Trivial spell fix in hns3 driver

    Some trivial spelling mistakes which caught my eye during the
    review of the code.
    
    Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
    Link: https://lore.kernel.org/r/20210409074223.32480-1-salil.mehta@huawei.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Salil Mehta authored and Jakub Kicinski committed Apr 9, 2021
  21. lan743x: fix ethernet frame cutoff issue

    The ethernet frame length is calculated incorrectly. Depending on
    the value of RX_HEAD_PADDING, this may result in ethernet frames
    that are too short (cut off at the end), or too long (garbage added
    to the end).
    
    Fix by calculating the ethernet frame length correctly. For added
    clarity, use the ETH_FCS_LEN constant in the calculation.
    
    Many thanks to Heiner Kallweit for suggesting this solution.
    
    Suggested-by: Heiner Kallweit <hkallweit1@gmail.com>
    Fixes: 3e21a10 ("lan743x: trim all 4 bytes of the FCS; not just 2")
    Link: https://lore.kernel.org/lkml/20210408172353.21143-1-TheSven73@gmail.com/
    Signed-off-by: Sven Van Asbroeck <thesven73@gmail.com>
    Reviewed-by: George McCollister <george.mccollister@gmail.com>
    Tested-by: George McCollister <george.mccollister@gmail.com>
    Link: https://lore.kernel.org/r/20210409003904.8957-1-TheSven73@gmail.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Sven Van Asbroeck authored and Jakub Kicinski committed Apr 9, 2021
  22. of: property: fw_devlink: do not link ".*,nr-gpios"

    [<vendor>,]nr-gpios property is used by some GPIO drivers[0] to indicate
    the number of GPIOs present on a system, not define a GPIO. nr-gpios is
    not configured by #gpio-cells and can't be parsed along with other
    "*-gpios" properties.
    
    nr-gpios without the "<vendor>," prefix is not allowed by the DT
    spec[1], so only add exception for the ",nr-gpios" suffix and let the
    error message continue being printed for non-compliant implementations.
    
    [0] nr-gpios is referenced in Documentation/devicetree/bindings/gpio:
     - gpio-adnp.txt
     - gpio-xgene-sb.txt
     - gpio-xlp.txt
     - snps,dw-apb-gpio.yaml
    
    [1] Link: https://github.com/devicetree-org/dt-schema/blob/cb53a16a1eb3e2169ce170c071e47940845ec26e/schemas/gpio/gpio-consumer.yaml#L20
    
    Fixes errors such as:
      OF: /palmbus@300000/gpio@600: could not find phandle
    
    Fixes: 7f00be9 ("of: property: Add device link support for interrupt-parent, dmas and -gpio(s)")
    Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
    Cc: Saravana Kannan <saravanak@google.com>
    Cc: stable@vger.kernel.org # v5.5+
    Link: https://lore.kernel.org/r/20210405222540.18145-1-ilya.lipnitskiy@gmail.com
    Signed-off-by: Rob Herring <robh@kernel.org>
    lipnitsk authored and robherring committed Apr 9, 2021
  23. dt-bindings:iio:adc: update motorola,cpcap-adc.yaml reference

    Changeset 1ca9d1b ("dt-bindings:iio:adc:motorola,cpcap-adc yaml conversion")
    renamed: Documentation/devicetree/bindings/iio/adc/cpcap-adc.txt
    to: Documentation/devicetree/bindings/iio/adc/motorola,cpcap-adc.yaml.
    
    Update its cross-reference accordingly.
    
    Fixes: 1ca9d1b ("dt-bindings:iio:adc:motorola,cpcap-adc yaml conversion")
    Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Link: https://lore.kernel.org/r/3e205e5fa701e4bc15d39d6ac1f57717df2bb4c6.1617972339.git.mchehab+huawei@kernel.org
    Signed-off-by: Rob Herring <robh@kernel.org>
    mchehab authored and robherring committed Apr 9, 2021
  24. dt-bindings: fix references for iio-bindings.txt

    The iio-bindings.txt was converted into two files and merged
    at the dt-schema git tree at:
    
    	https://github.com/devicetree-org/dt-schema
    
    Yet, some documents still refer to the old file. Fix their
    references, in order to point to the right URL.
    
    Fixes: dba91f8 ("dt-bindings:iio:iio-binding.txt Drop file as content now in dt-schema")
    Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
    Acked-by: Guenter Roeck <linux@roeck-us.net>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Link: https://lore.kernel.org/r/4efd81eca266ca0875d3bf9d1672097444146c69.1617972339.git.mchehab+huawei@kernel.org
    Signed-off-by: Rob Herring <robh@kernel.org>
    mchehab authored and robherring committed Apr 9, 2021
  25. dt-bindings: don't use ../dir for doc references

    As documents have been renamed and moved around, their
    references will break, but this will be unnoticed, as the
    script which checks for it won't handle "../" references.
    
    So, replace them by the full patch.
    
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Link: https://lore.kernel.org/r/68d3a1244119d1f2829c375b0ef554cf348bc89f.1617972339.git.mchehab+huawei@kernel.org
    Signed-off-by: Rob Herring <robh@kernel.org>
    mchehab authored and robherring committed Apr 9, 2021
Older