Skip to content
Permalink
Milind-Changir…
Switch branches/tags

Commits on Feb 11, 2022

  1. ceph: add getvxattr op

    Problem:
    Directory vxattrs like ceph.dir.pin* and ceph.dir.layout* may not be
    propagated to the client as frequently to keep them updated. This
    creates vxattr availability problems.
    
    Solution:
    Adds new getvxattr op to fetch ceph.dir.pin*, ceph.dir.layout* and
    ceph.file.layout* vxattrs.
    If the entire layout for a dir or a file is being set, then it is
    expected that the layout be set in standard JSON format. Individual
    field value retrieval is not wrapped in JSON. The JSON format also
    applies while setting the vxattr if the entire layout is being set in
    one go.
    
    As a temporary measure, setting a vxattr can also be done in the old
    format. The old format will be deprecated in the future.
    
    URL: https://tracker.ceph.com/issues/51062
    Signed-off-by: Milind Changire <mchangir@redhat.com>
    energon0 authored and intel-lab-lkp committed Feb 11, 2022

Commits on Feb 2, 2022

  1. libceph: optionally use bounce buffer on recv path in crc mode

    Both msgr1 and msgr2 in crc mode are zero copy in the sense that
    message data is read from the socket directly into the destination
    buffer.  We assume that the destination buffer is stable (i.e. remains
    unchanged while it is being read to) though.  Otherwise, CRC errors
    ensue:
    
      libceph: read_partial_message 0000000048edf8ad data crc 1063286393 != exp. 228122706
      libceph: osd1 (1)192.168.122.1:6843 bad crc/signature
    
      libceph: bad data crc, calculated 57958023, expected 1805382778
      libceph: osd2 (2)192.168.122.1:6876 integrity error, bad crc
    
    Introduce rxbounce option to enable use of a bounce buffer when
    receiving message data.  In particular this is needed if a mapped
    image is a Windows VM disk, passed to QEMU.  Windows has a system-wide
    "dummy" page that may be mapped into the destination buffer (potentially
    more than once into the same buffer) by the Windows Memory Manager in
    an effort to generate a single large I/O [1][2].  QEMU makes a point of
    preserving overlap relationships when cloning I/O vectors, so krbd gets
    exposed to this behaviour.
    
    [1] "What Is Really in That MDL?"
        https://docs.microsoft.com/en-us/previous-versions/windows/hardware/design/dn614012(v=vs.85)
    [2] https://blogs.msmvps.com/kernelmustard/2005/05/04/dummy-pages/
    
    URL: https://bugzilla.redhat.com/show_bug.cgi?id=1973317
    Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
    Reviewed-by: Jeff Layton <jlayton@kernel.org>
    idryomov committed Feb 2, 2022
  2. libceph: make recv path in secure mode work the same as send path

    The recv path of secure mode is intertwined with that of crc mode.
    While it's slightly more efficient that way (the ciphertext is read
    into the destination buffer and decrypted in place, thus avoiding
    two potentially heavy memory allocations for the bounce buffer and
    the corresponding sg array), it isn't really amenable to changes.
    Sacrifice that edge and align with the send path which always uses
    a full-sized bounce buffer (currently there is no other way -- if
    the kernel crypto API ever grows support for streaming (piecewise)
    en/decryption for GCM [1], we would be able to easily take advantage
    of that on both sides).
    
    [1] https://lore.kernel.org/all/20141225202830.GA18794@gondor.apana.org.au/
    
    Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
    Reviewed-by: Jeff Layton <jlayton@kernel.org>
    idryomov committed Feb 2, 2022

Commits on Jan 30, 2022

  1. Linux 5.17-rc2

    torvalds committed Jan 30, 2022
  2. Merge tag 'irq_urgent_for_v5.17_rc2_p2' of git://git.kernel.org/pub/s…

    …cm/linux/kernel/git/tip/tip
    
    Pull irq fixes from Borislav Petkov:
    
     - Drop an unused private data field in the AIC driver
    
     - Various fixes to the realtek-rtl driver
    
     - Make the GICv3 ITS driver compile again in !SMP configurations
    
     - Force reset of the GICv3 ITSs at probe time to avoid issues during kexec
    
     - Yet another kfree/bitmap_free conversion
    
     - Various DT updates (Renesas, SiFive)
    
    * tag 'irq_urgent_for_v5.17_rc2_p2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
      dt-bindings: interrupt-controller: sifive,plic: Group interrupt tuples
      dt-bindings: interrupt-controller: sifive,plic: Fix number of interrupts
      dt-bindings: irqchip: renesas-irqc: Add R-Car V3U support
      irqchip/gic-v3-its: Reset each ITS's BASERn register before probe
      irqchip/gic-v3-its: Fix build for !SMP
      irqchip/loongson-pch-ms: Use bitmap_free() to free bitmap
      irqchip/realtek-rtl: Service all pending interrupts
      irqchip/realtek-rtl: Fix off-by-one in routing
      irqchip/realtek-rtl: Map control data to virq
      irqchip/apple-aic: Drop unused ipi_hwirq field
    torvalds committed Jan 30, 2022
  3. Merge tag 'perf_urgent_for_v5.17_rc2_p2' of git://git.kernel.org/pub/…

    …scm/linux/kernel/git/tip/tip
    
    Pull perf fixes from Borislav Petkov:
    
     - Prevent accesses to the per-CPU cgroup context list from another CPU
       except the one it belongs to, to avoid list corruption
    
     - Make sure parent events are always woken up to avoid indefinite hangs
       in the traced workload
    
    * tag 'perf_urgent_for_v5.17_rc2_p2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
      perf/core: Fix cgroup event list management
      perf: Always wake the parent event
    torvalds committed Jan 30, 2022
  4. Merge tag 'sched_urgent_for_v5.17_rc2_p2' of git://git.kernel.org/pub…

    …/scm/linux/kernel/git/tip/tip
    
    Pull scheduler fix from Borislav Petkov:
     "Make sure the membarrier-rseq fence commands are part of the reported
      set when querying membarrier(2) commands through MEMBARRIER_CMD_QUERY"
    
    * tag 'sched_urgent_for_v5.17_rc2_p2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
      sched/membarrier: Fix membarrier-rseq fence command missing from query bitmask
    torvalds committed Jan 30, 2022
  5. Merge tag 'x86_urgent_for_v5.17_rc2' of git://git.kernel.org/pub/scm/…

    …linux/kernel/git/tip/tip
    
    Pull x86 fixes from Borislav Petkov:
    
     - Add another Intel CPU model to the list of CPUs supporting the
       processor inventory unique number
    
     - Allow writing to MCE thresholding sysfs files again - a previous
       change had accidentally disabled it and no one noticed. Goes to show
       how much is this stuff used
    
    * tag 'x86_urgent_for_v5.17_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
      x86/cpu: Add Xeon Icelake-D to list of CPUs that support PPIN
      x86/MCE/AMD: Allow thresholding interface updates after init
    torvalds committed Jan 30, 2022
  6. Merge branch 'akpm' (patches from Andrew)

    Merge misc fixes from Andrew Morton:
     "12 patches.
    
      Subsystems affected by this patch series: sysctl, binfmt, ia64, mm
      (memory-failure, folios, kasan, and psi), selftests, and ocfs2"
    
    * emailed patches from Andrew Morton <akpm@linux-foundation.org>:
      ocfs2: fix a deadlock when commit trans
      jbd2: export jbd2_journal_[grab|put]_journal_head
      psi: fix "defined but not used" warnings when CONFIG_PROC_FS=n
      psi: fix "no previous prototype" warnings when CONFIG_CGROUPS=n
      mm, kasan: use compare-exchange operation to set KASAN page tag
      kasan: test: fix compatibility with FORTIFY_SOURCE
      tools/testing/scatterlist: add missing defines
      mm: page->mapping folio->mapping should have the same offset
      memory-failure: fetch compound_head after pgmap_pfn_valid()
      ia64: make IA64_MCA_RECOVERY bool instead of tristate
      binfmt_misc: fix crash when load/unload module
      include/linux/sysctl.h: fix register_sysctl_mount_point() return type
    torvalds committed Jan 30, 2022
  7. ocfs2: fix a deadlock when commit trans

    commit 6f1b228 introduces a regression which can deadlock as
    follows:
    
      Task1:                              Task2:
      jbd2_journal_commit_transaction     ocfs2_test_bg_bit_allocatable
      spin_lock(&jh->b_state_lock)        jbd_lock_bh_journal_head
      __jbd2_journal_remove_checkpoint    spin_lock(&jh->b_state_lock)
      jbd2_journal_put_journal_head
      jbd_lock_bh_journal_head
    
    Task1 and Task2 lock bh->b_state and jh->b_state_lock in different
    order, which finally result in a deadlock.
    
    So use jbd2_journal_[grab|put]_journal_head instead in
    ocfs2_test_bg_bit_allocatable() to fix it.
    
    Link: https://lkml.kernel.org/r/20220121071205.100648-3-joseph.qi@linux.alibaba.com
    Fixes: 6f1b228 ("ocfs2: fix race between searching chunks and release journal_head from buffer_head")
    Signed-off-by: Joseph Qi <joseph.qi@linux.alibaba.com>
    Reported-by: Gautham Ananthakrishna <gautham.ananthakrishna@oracle.com>
    Tested-by: Gautham Ananthakrishna <gautham.ananthakrishna@oracle.com>
    Reported-by: Saeed Mirzamohammadi <saeed.mirzamohammadi@oracle.com>
    Cc: "Theodore Ts'o" <tytso@mit.edu>
    Cc: Andreas Dilger <adilger.kernel@dilger.ca>
    Cc: Changwei Ge <gechangwei@live.cn>
    Cc: Gang He <ghe@suse.com>
    Cc: Joel Becker <jlbec@evilplan.org>
    Cc: Jun Piao <piaojun@huawei.com>
    Cc: Junxiao Bi <junxiao.bi@oracle.com>
    Cc: Mark Fasheh <mark@fasheh.com>
    Cc: <stable@vger.kernel.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    josephhz authored and torvalds committed Jan 30, 2022
  8. jbd2: export jbd2_journal_[grab|put]_journal_head

    Patch series "ocfs2: fix a deadlock case".
    
    This fixes a deadlock case in ocfs2.  We firstly export jbd2 symbols
    jbd2_journal_[grab|put]_journal_head as preparation and later use them
    in ocfs2 insread of jbd_[lock|unlock]_bh_journal_head to fix the
    deadlock.
    
    This patch (of 2):
    
    This exports symbols jbd2_journal_[grab|put]_journal_head, which will be
    used outside modules, e.g.  ocfs2.
    
    Link: https://lkml.kernel.org/r/20220121071205.100648-2-joseph.qi@linux.alibaba.com
    Signed-off-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: Andreas Dilger <adilger.kernel@dilger.ca>
    Cc: Gautham Ananthakrishna <gautham.ananthakrishna@oracle.com>
    Cc: Saeed Mirzamohammadi <saeed.mirzamohammadi@oracle.com>
    Cc: "Theodore Ts'o" <tytso@mit.edu>
    Cc: <stable@vger.kernel.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    josephhz authored and torvalds committed Jan 30, 2022
  9. psi: fix "defined but not used" warnings when CONFIG_PROC_FS=n

    When CONFIG_PROC_FS is disabled psi code generates the following
    warnings:
    
      kernel/sched/psi.c:1364:30: warning: 'psi_cpu_proc_ops' defined but not used [-Wunused-const-variable=]
          1364 | static const struct proc_ops psi_cpu_proc_ops = {
               |                              ^~~~~~~~~~~~~~~~
      kernel/sched/psi.c:1355:30: warning: 'psi_memory_proc_ops' defined but not used [-Wunused-const-variable=]
          1355 | static const struct proc_ops psi_memory_proc_ops = {
               |                              ^~~~~~~~~~~~~~~~~~~
      kernel/sched/psi.c:1346:30: warning: 'psi_io_proc_ops' defined but not used [-Wunused-const-variable=]
          1346 | static const struct proc_ops psi_io_proc_ops = {
               |                              ^~~~~~~~~~~~~~~
    
    Make definitions of these structures and related functions conditional
    on CONFIG_PROC_FS config.
    
    Link: https://lkml.kernel.org/r/20220119223940.787748-3-surenb@google.com
    Fixes: 0e94682 ("psi: introduce psi monitor")
    Signed-off-by: Suren Baghdasaryan <surenb@google.com>
    Reported-by: kernel test robot <lkp@intel.com>
    Acked-by: Johannes Weiner <hannes@cmpxchg.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    surenbaghdasaryan authored and torvalds committed Jan 30, 2022
  10. psi: fix "no previous prototype" warnings when CONFIG_CGROUPS=n

    When CONFIG_CGROUPS is disabled psi code generates the following
    warnings:
    
      kernel/sched/psi.c:1112:21: warning: no previous prototype for 'psi_trigger_create' [-Wmissing-prototypes]
          1112 | struct psi_trigger *psi_trigger_create(struct psi_group *group,
               |                     ^~~~~~~~~~~~~~~~~~
      kernel/sched/psi.c:1182:6: warning: no previous prototype for 'psi_trigger_destroy' [-Wmissing-prototypes]
          1182 | void psi_trigger_destroy(struct psi_trigger *t)
               |      ^~~~~~~~~~~~~~~~~~~
      kernel/sched/psi.c:1249:10: warning: no previous prototype for 'psi_trigger_poll' [-Wmissing-prototypes]
          1249 | __poll_t psi_trigger_poll(void **trigger_ptr,
               |          ^~~~~~~~~~~~~~~~
    
    Change the declarations of these functions in the header to provide the
    prototypes even when they are unused.
    
    Link: https://lkml.kernel.org/r/20220119223940.787748-2-surenb@google.com
    Fixes: 0e94682 ("psi: introduce psi monitor")
    Signed-off-by: Suren Baghdasaryan <surenb@google.com>
    Reported-by: kernel test robot <lkp@intel.com>
    Acked-by: Johannes Weiner <hannes@cmpxchg.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    surenbaghdasaryan authored and torvalds committed Jan 30, 2022
  11. mm, kasan: use compare-exchange operation to set KASAN page tag

    It has been reported that the tag setting operation on newly-allocated
    pages can cause the page flags to be corrupted when performed
    concurrently with other flag updates as a result of the use of
    non-atomic operations.
    
    Fix the problem by using a compare-exchange loop to update the tag.
    
    Link: https://lkml.kernel.org/r/20220120020148.1632253-1-pcc@google.com
    Link: https://linux-review.googlesource.com/id/I456b24a2b9067d93968d43b4bb3351c0cec63101
    Fixes: 2813b9c ("kasan, mm, arm64: tag non slab memory allocated via pagealloc")
    Signed-off-by: Peter Collingbourne <pcc@google.com>
    Reviewed-by: Andrey Konovalov <andreyknvl@gmail.com>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: <stable@vger.kernel.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    pcc authored and torvalds committed Jan 30, 2022
  12. kasan: test: fix compatibility with FORTIFY_SOURCE

    With CONFIG_FORTIFY_SOURCE enabled, string functions will also perform
    dynamic checks using __builtin_object_size(ptr), which when failed will
    panic the kernel.
    
    Because the KASAN test deliberately performs out-of-bounds operations,
    the kernel panics with FORTIFY_SOURCE, for example:
    
     | kernel BUG at lib/string_helpers.c:910!
     | invalid opcode: 0000 [#1] PREEMPT SMP KASAN PTI
     | CPU: 1 PID: 137 Comm: kunit_try_catch Tainted: G    B             5.16.0-rc3+ #3
     | Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.14.0-2 04/01/2014
     | RIP: 0010:fortify_panic+0x19/0x1b
     | ...
     | Call Trace:
     |  kmalloc_oob_in_memset.cold+0x16/0x16
     |  ...
    
    Fix it by also hiding `ptr` from the optimizer, which will ensure that
    __builtin_object_size() does not return a valid size, preventing
    fortified string functions from panicking.
    
    Link: https://lkml.kernel.org/r/20220124160744.1244685-1-elver@google.com
    Signed-off-by: Marco Elver <elver@google.com>
    Reported-by: Nico Pache <npache@redhat.com>
    Reviewed-by: Nico Pache <npache@redhat.com>
    Reviewed-by: Andrey Konovalov <andreyknvl@gmail.com>
    Reviewed-by: Kees Cook <keescook@chromium.org>
    Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com>
    Cc: Alexander Potapenko <glider@google.com>
    Cc: Dmitry Vyukov <dvyukov@google.com>
    Cc: Brendan Higgins <brendanhiggins@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 Jan 30, 2022
  13. tools/testing/scatterlist: add missing defines

    The cited commits replaced preemptible with pagefault_disabled and
    flush_kernel_dcache_page with flush_dcache_page respectively, hence need
    to update the corresponding defines in the test.
    
      scatterlist.c: In function ‘sg_miter_stop’:
      scatterlist.c:919:4: warning: implicit declaration of function ‘flush_dcache_page’ [-Wimplicit-function-declaration]
          flush_dcache_page(miter->page);
          ^~~~~~~~~~~~~~~~~
      In file included from linux/scatterlist.h:8:0,
                       from scatterlist.c:9:
      scatterlist.c:922:18: warning: implicit declaration of function ‘pagefault_disabled’ [-Wimplicit-function-declaration]
          WARN_ON_ONCE(!pagefault_disabled());
                        ^
      linux/mm.h:23:25: note: in definition of macro ‘WARN_ON_ONCE’
        int __ret_warn_on = !!(condition);                      \
                               ^~~~~~~~~
    
    Link: https://lkml.kernel.org/r/20220118082105.1737320-1-maorg@nvidia.com
    Fixes: 723aca2 ("mm/scatterlist: replace the !preemptible warning in sg_miter_stop()")
    Fixes: 0e84f5d ("scatterlist: replace flush_kernel_dcache_page with flush_dcache_page")
    Signed-off-by: Maor Gottlieb <maorg@nvidia.com>
    Tested-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: Christoph Hellwig <hch@lst.de>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    maorgottlieb authored and torvalds committed Jan 30, 2022
  14. mm: page->mapping folio->mapping should have the same offset

    As with the other members of folio, the offset of page->mapping and
    folio->mapping must be the same.  The compile-time check was
    inadvertently removed during development.  Add it back.
    
    [willy@infradead.org: changelog redo]
    
    Link: https://lkml.kernel.org/r/20220104011734.21714-1-richard.weiyang@gmail.com
    Signed-off-by: Wei Yang <richard.weiyang@gmail.com>
    Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    RichardWeiYang authored and torvalds committed Jan 30, 2022
  15. memory-failure: fetch compound_head after pgmap_pfn_valid()

    memory_failure_dev_pagemap() at the moment assumes base pages (e.g.
    dax_lock_page()).  For devmap with compound pages fetch the
    compound_head in case a tail page memory failure is being handled.
    
    Currently this is a nop, but in the advent of compound pages in
    dev_pagemap it allows memory_failure_dev_pagemap() to keep working.
    
    Without this fix memory-failure handling (i.e.  MCEs on pmem) with
    device-dax configured namespaces will regress (and crash).
    
    Link: https://lkml.kernel.org/r/20211202204422.26777-2-joao.m.martins@oracle.com
    Reported-by: Jane Chu <jane.chu@oracle.com>
    Signed-off-by: Joao Martins <joao.m.martins@oracle.com>
    Reviewed-by: Naoya Horiguchi <naoya.horiguchi@nec.com>
    Reviewed-by: Dan Williams <dan.j.williams@intel.com>
    Reviewed-by: Muchun Song <songmuchun@bytedance.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    jpemartins authored and torvalds committed Jan 30, 2022
  16. ia64: make IA64_MCA_RECOVERY bool instead of tristate

    In linux-next, IA64_MCA_RECOVERY uses the (new) function
    make_task_dead(), which is not exported for use by modules.  Instead of
    exporting it for one user, convert IA64_MCA_RECOVERY to be a bool
    Kconfig symbol.
    
    In a config file from "kernel test robot <lkp@intel.com>" for a
    different problem, this linker error was exposed when
    CONFIG_IA64_MCA_RECOVERY=m.
    
    Fixes this build error:
    
      ERROR: modpost: "make_task_dead" [arch/ia64/kernel/mca_recovery.ko] undefined!
    
    Link: https://lkml.kernel.org/r/20220124213129.29306-1-rdunlap@infradead.org
    Fixes: 0e25498 ("exit: Add and use make_task_dead.")
    Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
    Suggested-by: Christoph Hellwig <hch@infradead.org>
    Reviewed-by: Christoph Hellwig <hch@lst.de>
    Reviewed-by: "Eric W. Biederman" <ebiederm@xmission.com>
    Cc: Tony Luck <tony.luck@intel.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    rddunlap authored and torvalds committed Jan 30, 2022
  17. binfmt_misc: fix crash when load/unload module

    We should unregister the table upon module unload otherwise something
    horrible will happen when we load binfmt_misc module again.  Also note
    that we should keep value returned by register_sysctl_mount_point() and
    release it later, otherwise it will leak.
    
    Also, per Christian's comment, to fully restore the old behavior that
    won't break userspace the check(binfmt_misc_header) should be
    eliminated.
    
    To reproduce:
      modprobe binfmt_misc
      modprobe -r binfmt_misc
      modprobe binfmt_misc
      modprobe -r binfmt_misc
      modprobe binfmt_misc
    
    resulting in
    
      modprobe: can't load module binfmt_misc (kernel/fs/binfmt_misc.ko): Cannot allocate memory
    
    and an unhappy kernel:
    
      binfmt_misc: Failed to create fs/binfmt_misc sysctl mount point
      binfmt_misc: Failed to create fs/binfmt_misc sysctl mount point
      BUG: unable to handle page fault for address: fffffbfff8004802
      Call Trace:
        init_misc_binfmt+0x2d/0x1000 [binfmt_misc]
    
    Link: https://lkml.kernel.org/r/20220124181812.1869535-2-ztong0001@gmail.com
    Fixes: 3ba442d ("fs: move binfmt_misc sysctl to its own file")
    Signed-off-by: Tong Zhang <ztong0001@gmail.com>
    Co-developed-by: Christian Brauner<brauner@kernel.org>
    Acked-by: Luis Chamberlain <mcgrof@kernel.org>
    Cc: Eric Biederman <ebiederm@xmission.com>
    Cc: Kees Cook <keescook@chromium.org>
    Cc: Iurii Zaikin <yzaikin@google.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    lzto authored and torvalds committed Jan 30, 2022
  18. include/linux/sysctl.h: fix register_sysctl_mount_point() return type

    The CONFIG_SYSCTL=n stub returns the wrong type.
    
    Fixes: ee9efac ("sysctl: add helper to register a sysctl mount point")
    Reported-by: kernel test robot <lkp@intel.com>
    Acked-by: Luis Chamberlain <mcgrof@kernel.org>
    Cc: Tong Zhang <ztong0001@gmail.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    akpm00 authored and torvalds committed Jan 30, 2022

Commits on Jan 29, 2022

  1. Merge tag 'irqchip-fixes-5.17-1' of git://git.kernel.org/pub/scm/linu…

    …x/kernel/git/maz/arm-platforms into irq/urgent
    
    Pull irqchip fixes from Marc Zyngier:
    
      - Drop an unused private data field in the AIC driver
    
      - Various fixes to the realtek-rtl driver
    
      - Make the GICv3 ITS driver compile again in !SMP configurations
    
      - Force reset of the GICv3 ITSs at probe time to avoid issues during kexec
    
      - Yet another kfree/bitmap_free conversion
    
      - Various DT updates (Renesas, SiFive)
    
    Link: https://lore.kernel.org/r/20220128174217.517041-1-maz@kernel.org
    Thomas Gleixner committed Jan 29, 2022
  2. Merge tag 'pci-v5.17-fixes-2' of git://git.kernel.org/pub/scm/linux/k…

    …ernel/git/helgaas/pci
    
    Pull pci fixes from Bjorn Helgaas:
    
     - Fix compilation warnings in new mt7621 driver (Sergio Paracuellos)
    
     - Restore the sysfs "rom" file for VGA shadow ROMs, which was broken
       when converting "rom" to be a static attribute (Bjorn Helgaas)
    
    * tag 'pci-v5.17-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
      PCI/sysfs: Find shadow ROM before static attribute initialization
      PCI: mt7621: Remove unused function pcie_rmw()
      PCI: mt7621: Drop of_match_ptr() to avoid unused variable
    torvalds committed Jan 29, 2022
  3. Merge tag 'gpio-fixes-for-v5.17-rc2' of git://git.kernel.org/pub/scm/…

    …linux/kernel/git/brgl/linux
    
    Pull gpio fixes from Bartosz Golaszewski:
     "Two fixes for the gpio-simulator:
    
       - fix a bug with hogs not being set-up in gpio-sim when user-space
         sets the chip label to an empty string
    
       - include the gpio-sim documentation in the index"
    
    * tag 'gpio-fixes-for-v5.17-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux:
      gpio: sim: add doc file to index file
      gpio: sim: check the label length when setting up device properties
    torvalds committed Jan 29, 2022
  4. Merge tag 'char-misc-5.17-rc2' of git://git.kernel.org/pub/scm/linux/…

    …kernel/git/gregkh/char-misc
    
    Pull char/misc driver fixes from Greg KH:
     "Here are two small char/misc driver fixes for 5.17-rc2 that fix some
      reported issues. They are:
    
       - fix up a merge issue in the at25.c driver that ended up dropping
         some lines in the driver. The removed lines ended being needed, so
         this restores it and the driver works again.
    
       - counter core fix where the wrong error was being returned, NULL
         should be the correct error for when memory is gone here, like the
         kmalloc() core does.
    
      Both of these have been in linux-next this week with no reported
      issues"
    
    * tag 'char-misc-5.17-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
      counter: fix an IS_ERR() vs NULL bug
      eeprom: at25: Restore missing allocation
    torvalds committed Jan 29, 2022
  5. Merge tag 'tty-5.17-rc2' of git://git.kernel.org/pub/scm/linux/kernel…

    …/git/gregkh/tty
    
    Pull tty/serial driver fixes from Greg KH:
     "Here are some small bug fixes and reverts for reported problems with
      the tty core and drivers. They include:
    
       - revert the fifo use for the 8250 console mode. It caused too many
         regressions and problems, and had a bug in it as well. This is
         being reworked and should show up in a later -rc1 release, but it's
         not ready for 5.17
    
       - rpmsg tty race fix
    
       - restore the cyclades.h uapi header file. Turns out a compiler test
         suite used it for some unknown reason. Bring it back just for the
         parts that are used by the builder test so they continue to build.
         No functionality is restored as no one actually has this hardware
         anymore, nor is it really tested.
    
       - stm32 driver fixes
    
       - n_gsm flow control fixes
    
       - pl011 driver fix
    
       - rs485 initialization fix
    
      All of these have been in linux-next this week with no reported
      problems"
    
    * tag 'tty-5.17-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
      kbuild: remove include/linux/cyclades.h from header file check
      serial: core: Initialize rs485 RTS polarity already on probe
      serial: pl011: Fix incorrect rs485 RTS polarity on set_mctrl
      serial: stm32: fix software flow control transfer
      serial: stm32: prevent TDR register overwrite when sending x_char
      tty: n_gsm: fix SW flow control encoding/handling
      serial: 8250: of: Fix mapped region size when using reg-offset property
      tty: rpmsg: Fix race condition releasing tty port
      tty: Partially revert the removal of the Cyclades public API
      tty: Add support for Brainboxes UC cards.
      Revert "tty: serial: Use fifo in 8250 console driver"
    torvalds committed Jan 29, 2022
  6. Merge tag 'usb-5.17-rc2' of git://git.kernel.org/pub/scm/linux/kernel…

    …/git/gregkh/usb
    
    Pull USB driver fixes from Greg KH:
     "Here are some small USB driver fixes for 5.17-rc2 that resolve a
      number of reported problems. These include:
    
       - typec driver fixes
    
       - xhci platform driver fixes for suspending
    
       - ulpi core fix
    
       - role.h build fix
    
       - new device ids
    
       - syzbot-reported bugfixes
    
       - gadget driver fixes
    
       - dwc3 driver fixes
    
       - other small fixes
    
      All of these have been in linux-next this week with no reported
      issues"
    
    * tag 'usb-5.17-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
      usb: cdnsp: Fix segmentation fault in cdns_lost_power function
      usb: dwc2: gadget: don't try to disable ep0 in dwc2_hsotg_suspend
      usb: gadget: at91_udc: fix incorrect print type
      usb: dwc3: xilinx: Fix error handling when getting USB3 PHY
      usb: dwc3: xilinx: Skip resets and USB3 register settings for USB2.0 mode
      usb: xhci-plat: fix crash when suspend if remote wake enable
      usb: common: ulpi: Fix crash in ulpi_match()
      usb: gadget: f_sourcesink: Fix isoc transfer for USB_SPEED_SUPER_PLUS
      ucsi_ccg: Check DEV_INT bit only when starting CCG4
      USB: core: Fix hang in usb_kill_urb by adding memory barriers
      usb-storage: Add unusual-devs entry for VL817 USB-SATA bridge
      usb: typec: tcpm: Do not disconnect when receiving VSAFE0V
      usb: typec: tcpm: Do not disconnect while receiving VBUS off
      usb: typec: Don't try to register component master without components
      usb: typec: Only attempt to link USB ports if there is fwnode
      usb: typec: tcpci: don't touch CC line if it's Vconn source
      usb: roles: fix include/linux/usb/role.h compile issue
    torvalds committed Jan 29, 2022
  7. Merge tag 'block-5.17-2022-01-28' of git://git.kernel.dk/linux-block

    Pull block fixes from Jens Axboe:
    
     - NVMe pull request
          - add the IGNORE_DEV_SUBNQN quirk for Intel P4500/P4600 SSDs (Wu
            Zheng)
          - remove the unneeded ret variable in nvmf_dev_show (Changcheng
            Deng)
    
     - Fix for a hang regression introduced with a patch in the merge
       window, where low queue depth devices would not always get woken
       correctly (Laibin)
    
     - Small series fixing an IO accounting issue with bio backed dm devices
       (Mike, Yu)
    
    * tag 'block-5.17-2022-01-28' of git://git.kernel.dk/linux-block:
      dm: properly fix redundant bio-based IO accounting
      dm: revert partial fix for redundant bio-based IO accounting
      block: add bio_start_io_acct_time() to control start_time
      blk-mq: Fix wrong wakeup batch configuration which will cause hang
      nvme-fabrics: remove the unneeded ret variable in nvmf_dev_show
      nvme-pci: add the IGNORE_DEV_SUBNQN quirk for Intel P4500/P4600 SSDs
      blk-mq: fix missing blk_account_io_done() in error path
      block: fix memory leak in disk_register_independent_access_ranges
    torvalds committed Jan 29, 2022
  8. Merge tag 'io_uring-5.17-2022-01-28' of git://git.kernel.dk/linux-block

    Pull io_uring fixes from Jens Axboe:
     "Just two small fixes this time:
    
       - Fix a bug that can lead to node registration taking 1 second, when
         it should finish much quicker (Dylan)
    
       - Remove an unused argument from a function (Usama)"
    
    * tag 'io_uring-5.17-2022-01-28' of git://git.kernel.dk/linux-block:
      io_uring: remove unused argument from io_rsrc_node_alloc
      io_uring: fix bug in slow unregistering of nodes
    torvalds committed Jan 29, 2022
  9. Merge tag 'powerpc-5.17-3' of git://git.kernel.org/pub/scm/linux/kern…

    …el/git/powerpc/linux
    
    Pull powerpc fixes from Michael Ellerman:
    
     - Fix VM debug warnings on boot triggered via __set_fixmap().
    
     - Fix a debug warning in the 64-bit Book3S PMU handling code.
    
     - Fix nested guest HFSCR handling with multiple vCPUs on Power9 or
       later.
    
     - Fix decrementer storm caused by a recent change, seen with some
       configs.
    
    Thanks to Alexey Kardashevskiy, Athira Rajeev, Christophe Leroy,
    Fabiano Rosas, Maxime Bizon, Nicholas Piggin, and Sachin Sant.
    
    * tag 'powerpc-5.17-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
      powerpc/64s/interrupt: Fix decrementer storm
      KVM: PPC: Book3S HV Nested: Fix nested HFSCR being clobbered with multiple vCPUs
      powerpc/perf: Fix power_pmu_disable to call clear_pmi_irq_pending only if PMI is pending
      powerpc/fixmap: Fix VM debug warning on unmap
    torvalds committed Jan 29, 2022
  10. Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/…

    …git/arm64/linux
    
    Pull arm64 fixes from Catalin Marinas:
    
     - Errata workarounds for Cortex-A510: broken hardware dirty bit
       management, detection code for the TRBE (tracing) bugs with the
       actual fixes going in via the CoreSight tree.
    
     - Cortex-X2 errata handling for TRBE (inheriting the workarounds from
       Cortex-A710).
    
     - Fix ex_handler_load_unaligned_zeropad() to use the correct struct
       members.
    
     - A couple of kselftest fixes for FPSIMD.
    
     - Silence the vdso "no previous prototype" warning.
    
     - Mark start_backtrace() notrace and NOKPROBE_SYMBOL.
    
    * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
      arm64: cpufeature: List early Cortex-A510 parts as having broken dbm
      kselftest/arm64: Correct logging of FPSIMD register read via ptrace
      kselftest/arm64: Skip VL_INHERIT tests for unsupported vector types
      arm64: errata: Add detection for TRBE trace data corruption
      arm64: errata: Add detection for TRBE invalid prohibited states
      arm64: errata: Add detection for TRBE ignored system register writes
      arm64: Add Cortex-A510 CPU part definition
      arm64: extable: fix load_unaligned_zeropad() reg indices
      arm64: Mark start_backtrace() notrace and NOKPROBE_SYMBOL
      arm64: errata: Update ARM64_ERRATUM_[2119858|2224489] with Cortex-X2 ranges
      arm64: Add Cortex-X2 CPU part definition
      arm64: vdso: Fix "no previous prototype" warning
    torvalds committed Jan 29, 2022
  11. Merge tag 'fixes-v5.17-lsm-ceph-null' of git://git.kernel.org/pub/scm…

    …/linux/kernel/git/jmorris/linux-security
    
    Pull security sybsystem fix from James Morris:
     "Fix NULL pointer crash in LSM via Ceph, from Vivek Goyal"
    
    * tag 'fixes-v5.17-lsm-ceph-null' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security:
      security, lsm: dentry_init_security() Handle multi LSM registration
    torvalds committed Jan 29, 2022
  12. Merge tag 'docs-5.17-3' of git://git.lwn.net/linux

    Pull documentation fixes from Jonathan Corbet:
     "A few documentation fixes for 5.17"
    
    * tag 'docs-5.17-3' of git://git.lwn.net/linux:
      docs/vm: Fix typo in *harden*
      Documentation: arm: marvell: Extend Avanta list
      docs: fix typo in Documentation/kernel-hacking/locking.rst
      docs: Hook the RTLA documents into the kernel docs build
    torvalds committed Jan 29, 2022

Commits on Jan 28, 2022

  1. dm: properly fix redundant bio-based IO accounting

    Record the start_time for a bio but defer the starting block core's IO
    accounting until after IO is submitted using bio_start_io_acct_time().
    
    This approach avoids the need to mess around with any of the
    individual IO stats in response to a bio_split() that follows bio
    submission.
    
    Reported-by: Bud Brown <bubrown@redhat.com>
    Reviewed-by: Christoph Hellwig <hch@lst.de>
    Cc: stable@vger.kernel.org
    Depends-on: e45c47d ("block: add bio_start_io_acct_time() to control start_time")
    Signed-off-by: Mike Snitzer <snitzer@redhat.com>
    Link: https://lore.kernel.org/r/20220128155841.39644-4-snitzer@redhat.com
    Signed-off-by: Jens Axboe <axboe@kernel.dk>
    snitm authored and axboe committed Jan 28, 2022
  2. dm: revert partial fix for redundant bio-based IO accounting

    Reverts a1e1cb7 ("dm: fix redundant IO accounting for bios that
    need splitting") because it was too narrow in scope (only addressed
    redundant 'sectors[]' accounting and not ios, nsecs[], etc).
    
    Cc: stable@vger.kernel.org
    Signed-off-by: Mike Snitzer <snitzer@redhat.com>
    Link: https://lore.kernel.org/r/20220128155841.39644-3-snitzer@redhat.com
    Signed-off-by: Jens Axboe <axboe@kernel.dk>
    snitm authored and axboe committed Jan 28, 2022
Older