Skip to content
  1. Apr 27, 2021
  2. Apr 26, 2021
    • Linus Torvalds's avatar
      Linux 5.12 · 9f4ad9e4
      Linus Torvalds authored
      v5.12
      9f4ad9e4
    • Linus Torvalds's avatar
      Merge tag 'perf-tools-fixes-for-v5.12-2021-04-25' of... · d2d09fbe
      Linus Torvalds authored
      Merge tag 'perf-tools-fixes-for-v5.12-2021-04-25' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux
      
      Pull perf tools fixes from Arnaldo Carvalho de Melo:
      
       - Fix potential NULL pointer dereference in the auxtrace option parser
      
       - Fix access to PID in an array when setting a PID filter in 'perf ftrace'
      
       - Fix error return code in the 'perf data' tool and in maps__clone(),
         found using a static analysis tool from Huawei
      
      * tag 'perf-tools-fixes-for-v5.12-2021-04-25' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux:
        perf map: Fix error return code in maps__clone()
        perf ftrace: Fix access to pid in array when setting a pid filter
        perf auxtrace: Fix potential NULL pointer dereference
        perf data: Fix error return code in perf_data__create_dir()
      d2d09fbe
    • Linus Torvalds's avatar
      Merge tag 'perf_urgent_for_v5.12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 24dfc390
      Linus Torvalds authored
      Pull x86 perf fixes from Borislav Petkov:
      
       - Fix Broadwell Xeon's stepping in the PEBS isolation table of CPUs
      
       - Fix a panic when initializing perf uncore machinery on Haswell and
         Broadwell servers
      
      * tag 'perf_urgent_for_v5.12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        perf/x86/kvm: Fix Broadwell Xeon stepping in isolation_ucodes[]
        perf/x86/intel/uncore: Remove uncore extra PCI dev HSWEP_PCI_PCU_3
      24dfc390
    • Linus Torvalds's avatar
      Merge tag 'locking_urgent_for_v5.12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 0146da0d
      Linus Torvalds authored
      Pull locking fix from Borislav Petkov:
       "Fix ordering in the queued writer lock's slowpath"
      
      * tag 'locking_urgent_for_v5.12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        locking/qrwlock: Fix ordering in queued_write_lock_slowpath()
      0146da0d
    • Linus Torvalds's avatar
      Merge tag 'sched_urgent_for_v5.12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 682b26bd
      Linus Torvalds authored
      Pull scheduler fix from Borislav Petkov:
       "Fix a typo in a macro ifdeffery"
      
      * tag 'sched_urgent_for_v5.12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        preempt/dynamic: Fix typo in macro conditional statement
      682b26bd
    • Linus Torvalds's avatar
      Merge tag 'x86_urgent_for_v5.12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 11fac7a0
      Linus Torvalds authored
      Pull x86 fix from Borislav Petkov:
       "Fix an out-of-bounds memory access when setting up a crash kernel with
        kexec"
      
      * tag 'x86_urgent_for_v5.12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/crash: Fix crash_setup_memmap_entries() out-of-bounds access
      11fac7a0
  3. Apr 25, 2021
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm · 2a1d7946
      Linus Torvalds authored
      Pull kvm fix from Paolo Bonzini:
       "Fix SRCU bug introduced in the merge window"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
        KVM: x86/xen: Take srcu lock when accessing kvm_memslots()
      2a1d7946
    • Linus Torvalds's avatar
      Revert "net/rds: Avoid potential use after free in rds_send_remove_from_sock" · 799bac55
      Linus Torvalds authored
      This reverts commit 0c85a7e8
      
      .
      
      The games with 'rm' are on (two separate instances) of a local variable,
      and make no difference.
      
      Quoting Aditya Pakki:
       "I was the author of the patch and it was the cause of the giant UMN
        revert.
      
        The patch is garbage and I was unaware of the steps involved in
        retracting it. I *believed* the maintainers would pull it, given it
        was already under Greg's list. The patch does not introduce any bugs
        but is pointless and is stupid. I accept my incompetence and for not
        requesting a revert earlier."
      
      Link: https://lwn.net/Articles/854319/
      Requested-by: default avatarAditya Pakki <pakki001@umn.edu>
      Cc: Santosh Shilimkar <santosh.shilimkar@oracle.com>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      799bac55
  4. Apr 24, 2021
    • Linus Torvalds's avatar
      Merge tag 'pinctrl-v5.12-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl · 8db5efb8
      Linus Torvalds authored
      Pull pin control fixes from Linus Walleij:
       "Late pin control fixes, would have been in the main pull request
        normally but hey I got lucky and we got another week to polish up
        v5.12 so here we go.
      
        One driver fix and one making the core debugfs work:
      
         - Fix the number of pins in the community of the Intel Lewisburg SoC
      
         - Show pin numbers for controllers with base = 0 in the new debugfs
           feature"
      
      * tag 'pinctrl-v5.12-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl:
        pinctrl: core: Show pin numbers for the controllers with base = 0
        pinctrl: lewisburg: Update number of pins in community
      8db5efb8
    • Linus Torvalds's avatar
      Merge branch 'akpm' (patches from Andrew) · e77a830c
      Linus Torvalds authored
      Merge misc fixes from Andrew Morton:
       "5 patches.
      
        Subsystems affected by this patch series: coda, overlayfs, and
        mm (pagecache and memcg)"
      
      * emailed patches from Andrew Morton <akpm@linux-foundation.org>:
        tools/cgroup/slabinfo.py: updated to work on current kernel
        mm/filemap: fix mapping_seek_hole_data on THP & 32-bit
        mm/filemap: fix find_lock_entries hang on 32-bit THP
        ovl: fix reference counting in ovl_mmap error path
        coda: fix reference counting in coda_file_mmap error path
      e77a830c
    • Linus Torvalds's avatar
      Merge tag 'block-5.12-2021-04-23' of git://git.kernel.dk/linux-block · 95838bd9
      Linus Torvalds authored
      Pull block fix from Jens Axboe:
       "A single fix for a behavioral regression in this series, when
        re-reading the partition table with partitions open"
      
      * tag 'block-5.12-2021-04-23' of git://git.kernel.dk/linux-block:
        block: return -EBUSY when there are open partitions in blkdev_reread_part
      95838bd9
    • Vasily Averin's avatar
      tools/cgroup/slabinfo.py: updated to work on current kernel · 1974c45d
      Vasily Averin authored
      
      
      slabinfo.py script does not work with actual kernel version.
      
      First, it was unable to recognise SLUB susbsytem, and when I specified
      it manually it failed again with
      
        AttributeError: 'struct page' has no member 'obj_cgroups'
      
      .. and then again with
      
        File "tools/cgroup/memcg_slabinfo.py", line 221, in main
          memcg.kmem_caches.address_of_(),
        AttributeError: 'struct mem_cgroup' has no member 'kmem_caches'
      
      Link: https://lkml.kernel.org/r/cec1a75e-43b4-3d64-2084-d9f98fda037f@virtuozzo.com
      Signed-off-by: default avatarVasily Averin <vvs@virtuozzo.com>
      Tested-by: default avatarRoman Gushchin <guro@fb.com>
      Acked-by: default avatarRoman Gushchin <guro@fb.com>
      Cc: Michal Hocko <mhocko@kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      1974c45d
    • Hugh Dickins's avatar
      mm/filemap: fix mapping_seek_hole_data on THP & 32-bit · ed98b015
      Hugh Dickins authored
      No problem on 64-bit, or without huge pages, but xfstests generic/285
      and other SEEK_HOLE/SEEK_DATA tests have regressed on huge tmpfs, and on
      32-bit architectures, with the new mapping_seek_hole_data().  Several
      different bugs turned out to need fixing.
      
      u64 cast to stop losing bits when converting unsigned long to loff_t
      (and let's use shifts throughout, rather than mixed with * and /).
      
      Use round_up() when advancing pos, to stop assuming that pos was already
      THP-aligned when advancing it by THP-size.  (This use of round_up()
      assumes that any THP has THP-aligned index: true at present and true
      going forward, but could be recoded to avoid the assumption.)
      
      Use xas_set() when iterating away from a THP, so that xa_index stays in
      synch with start, instead of drifting away to return bogus offset.
      
      Check start against end to avoid wrapping 32-bit xa_index to 0 (and to
      handle these additional cases, seek_data or not, it's easier to break
      the loop than goto: so rearrange exit from the function).
      
      [hughd@google.com: remove unneeded u64 casts, per Matthew]
        Link: https://lkml.kernel.org/r/alpine.LSU.2.11.2104221347240.1170@eggly.anvils
      
      Link: https://lkml.kernel.org/r/alpine.LSU.2.11.2104211737410.3299@eggly.anvils
      Fixes: 41139aa4
      
       ("mm/filemap: add mapping_seek_hole_data")
      Signed-off-by: default avatarHugh Dickins <hughd@google.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Dave Chinner <dchinner@redhat.com>
      Cc: Jan Kara <jack@suse.cz>
      Cc: Johannes Weiner <hannes@cmpxchg.org>
      Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
      Cc: Matthew Wilcox <willy@infradead.org>
      Cc: William Kucharski <william.kucharski@oracle.com>
      Cc: Yang Shi <yang.shi@linux.alibaba.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      ed98b015
    • Hugh Dickins's avatar
      mm/filemap: fix find_lock_entries hang on 32-bit THP · 2d11e738
      Hugh Dickins authored
      No problem on 64-bit, or without huge pages, but xfstests generic/308
      hung uninterruptibly on 32-bit huge tmpfs.
      
      Since commit 0cc3b0ec ("Clarify (and fix) in 4.13 MAX_LFS_FILESIZE
      macros"), MAX_LFS_FILESIZE is only a PAGE_SIZE away from wrapping 32-bit
      xa_index to 0, so the new find_lock_entries() has to be extra careful
      when handling a THP.
      
      Link: https://lkml.kernel.org/r/alpine.LSU.2.11.2104211735430.3299@eggly.anvils
      Fixes: 5c211ba2
      
       ("mm: add and use find_lock_entries")
      Signed-off-by: default avatarHugh Dickins <hughd@google.com>
      Cc: Matthew Wilcox <willy@infradead.org>
      Cc: William Kucharski <william.kucharski@oracle.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Jan Kara <jack@suse.cz>
      Cc: Dave Chinner <dchinner@redhat.com>
      Cc: Johannes Weiner <hannes@cmpxchg.org>
      Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
      Cc: Yang Shi <yang.shi@linux.alibaba.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      2d11e738
    • Christian König's avatar
      ovl: fix reference counting in ovl_mmap error path · 2896900e
      Christian König authored
      mmap_region() now calls fput() on the vma->vm_file.
      
      Fix this by using vma_set_file() so it doesn't need to be handled
      manually here any more.
      
      Link: https://lkml.kernel.org/r/20210421132012.82354-2-christian.koenig@amd.com
      Fixes: 1527f926
      
       ("mm: mmap: fix fput in error path v2")
      Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
      Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Jan Harkes <jaharkes@cs.cmu.edu>
      Cc: Miklos Szeredi <miklos@szeredi.hu>
      Cc: Jason Gunthorpe <jgg@ziepe.ca>
      Cc: <stable@vger.kernel.org>	[5.11+]
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      2896900e
    • Christian König's avatar
      coda: fix reference counting in coda_file_mmap error path · 9da29c7f
      Christian König authored
      mmap_region() now calls fput() on the vma->vm_file.
      
      So we need to drop the extra reference on the coda file instead of the
      host file.
      
      Link: https://lkml.kernel.org/r/20210421132012.82354-1-christian.koenig@amd.com
      Fixes: 1527f926
      
       ("mm: mmap: fix fput in error path v2")
      Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
      Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Acked-by: default avatarJan Harkes <jaharkes@cs.cmu.edu>
      Cc: Miklos Szeredi <miklos@szeredi.hu>
      Cc: Jason Gunthorpe <jgg@ziepe.ca>
      Cc: <stable@vger.kernel.org>	[5.11+]
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      9da29c7f
    • Wanpeng Li's avatar
      KVM: x86/xen: Take srcu lock when accessing kvm_memslots() · 9c1a0744
      Wanpeng Li authored
      kvm_memslots() will be called by kvm_write_guest_offset_cached() so we should
      take the srcu lock. Let's pull the srcu lock operation from kvm_steal_time_set_preempted()
      again to fix xen part.
      
      Fixes: 30b5c851
      
       ("KVM: x86/xen: Add support for vCPU runstate information")
      Signed-off-by: default avatarWanpeng Li <wanpengli@tencent.com>
      Message-Id: <1619166200-9215-1-git-send-email-wanpengli@tencent.com>
      Reviewed-by: default avatarSean Christopherson <seanjc@google.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      9c1a0744
    • Linus Torvalds's avatar
      Merge tag 'arm-fixes-5.12-4' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc · 6d1d45cb
      Linus Torvalds authored
      Pull ARM SoC fixes from Arnd Bergmann:
       "These should be the final fixes for v5.12.
      
        There is one fix for SD card detection on one Allwinner board, and a
        few fixes for the Tegra platform that I had already queued up for
        v5.13 due to a communication problem. This addresses MMC device
        ordering on multiple machines, audio support on Jetson AGX Xavier and
        suspend/resume on Jetson TX2"
      
      * tag 'arm-fixes-5.12-4' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc:
        arm64: dts: allwinner: Revert SD card CD GPIO for Pine64-LTS
        arm64: tegra: Move clocks from RT5658 endpoint to device node
        arm64: tegra: Fix mmc0 alias for Jetson Xavier NX
        arm64: tegra: Set fw_devlink=on for Jetson TX2
        arm64: tegra: Add unit-address for ACONNECT on Tegra186
      6d1d45cb
    • Zhen Lei's avatar
      perf map: Fix error return code in maps__clone() · c6f87141
      Zhen Lei authored
      Although 'err' has been initialized to -ENOMEM, but it will be reassigned
      by the "err = unwind__prepare_access(...)" statement in the for loop. So
      that, the value of 'err' is unknown when map__clone() failed.
      
      Fixes: 6c502584
      
       ("perf unwind: Call unwind__prepare_access for forked thread")
      Reported-by: default avatarHulk Robot <hulkci@huawei.com>
      Signed-off-by: default avatarZhen Lei <thunder.leizhen@huawei.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: zhen lei <thunder.leizhen@huawei.com>
      Link: http://lore.kernel.org/lkml/20210415092744.3793-1-thunder.leizhen@huawei.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      c6f87141
    • Thomas Richter's avatar
      perf ftrace: Fix access to pid in array when setting a pid filter · 671b60cb
      Thomas Richter authored
      
      
      Command 'perf ftrace -v -- ls' fails in s390 (at least 5.12.0rc6).
      
      The root cause is a missing pointer dereference which causes an
      array element address to be used as PID.
      
      Fix this by extracting the PID.
      
      Output before:
        # ./perf ftrace -v -- ls
        function_graph tracer is used
        write '-263732416' to tracing/set_ftrace_pid failed: Invalid argument
        failed to set ftrace pid
        #
      
      Output after:
         ./perf ftrace -v -- ls
         function_graph tracer is used
         # tracer: function_graph
         #
         # CPU  DURATION                  FUNCTION CALLS
         # |     |   |                     |   |   |   |
         4)               |  rcu_read_lock_sched_held() {
         4)   0.552 us    |    rcu_lockdep_current_cpu_online();
         4)   6.124 us    |  }
      
      Reported-by: default avatarAlexander Schmidt <alexschm@de.ibm.com>
      Signed-off-by: default avatarThomas Richter <tmricht@linux.ibm.com>
      Acked-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Heiko Carstens <hca@linux.ibm.com>
      Cc: Sumanth Korikkar <sumanthk@linux.ibm.com>
      Cc: Sven Schnelle <svens@linux.ibm.com>
      Cc: Vasily Gorbik <gor@linux.ibm.com>
      Link: http://lore.kernel.org/lkml/20210421120400.2126433-1-tmricht@linux.ibm.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      671b60cb
    • Leo Yan's avatar
      perf auxtrace: Fix potential NULL pointer dereference · b14585d9
      Leo Yan authored
      In the function auxtrace_parse_snapshot_options(), the callback pointer
      "itr->parse_snapshot_options" can be NULL if it has not been set during
      the AUX record initialization.  This can cause tool crashing if the
      callback pointer "itr->parse_snapshot_options" is dereferenced without
      performing NULL check.
      
      Add a NULL check for the pointer "itr->parse_snapshot_options" before
      invoke the callback.
      
      Fixes: d20031bb
      
       ("perf tools: Add AUX area tracing Snapshot Mode")
      Signed-off-by: default avatarLeo Yan <leo.yan@linaro.org>
      Acked-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Tiezhu Yang <yangtiezhu@loongson.cn>
      Link: http://lore.kernel.org/lkml/20210420151554.2031768-1-leo.yan@linaro.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      b14585d9
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-2021-04-23' of git://anongit.freedesktop.org/drm/drm · 5bfc75d9
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "Just some small i915 and amdgpu fixes this week, should be all until
        you open the merge window.
      
        amdgpu:
         - Fix gpuvm page table update issue
         - Modifier fixes
         - Register fix for dimgrey cavefish
      
        i915:
         - GVT's BDW regression fix for cmd parser
         - Fix modesetting in case of unexpected AUX timeouts"
      
      * tag 'drm-fixes-2021-04-23' of git://anongit.freedesktop.org/drm/drm:
        drm/amdgpu: fix GCR_GENERAL_CNTL offset for dimgrey_cavefish
        amd/display: allow non-linear multi-planar formats
        drm/amd/display: Update modifier list for gfx10_3
        drm/amdgpu: reserve fence slot to update page table
        drm/i915: Fix modesetting in case of unexpected AUX timeouts
        drm/i915/gvt: Fix BDW command parser regression
      5bfc75d9
    • Linus Torvalds's avatar
      Merge tag 'gpio-fixes-for-v5.12' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux · 22c4e5bc
      Linus Torvalds authored
      Pull gpio fix from Bartosz Golaszewski:
       "Save and restore the sysconfig register in gpio-omap to fix a
        power-management issue"
      
      * tag 'gpio-fixes-for-v5.12' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux:
        gpio: omap: Save and restore sysconfig
      22c4e5bc
  5. Apr 23, 2021
  6. Apr 22, 2021