The patch titled
Subject: epoll: fix possible lost wakeup on epoll_ctl() path
has been added to the -mm tree. Its filename is
epoll-fix-possible-lost-wakeup-on-epoll_ctl-path.patch
This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/epoll-fix-possible-lost-wakeup-on-…
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/epoll-fix-possible-lost-wakeup-on-…
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next and is updated
there every 3-4 working days
------------------------------------------------------
From: Roman Penyaev <rpenyaev(a)suse.de>
Subject: epoll: fix possible lost wakeup on epoll_ctl() path
This fixes possible lost wakeup introduced by commit a218cc491420.
Originally modifications to ep->wq were serialized by ep->wq.lock, but in
the a218cc491420 new rw lock was introduced in order to relax fd event
path, i.e. callers of ep_poll_callback() function.
After the change ep_modify and ep_insert (both are called on epoll_ctl()
path) were switched to ep->lock, but ep_poll (epoll_wait) was using
ep->wq.lock on wqueue list modification.
The bug doesn't lead to any wqueue list corruptions, because wake up path
and list modifications were serialized by ep->wq.lock internally, but
actual waitqueue_active() check prior wake_up() call can be reordered with
modifications of ep ready list, thus wake up can be lost.
And yes, can be healed by explicit smp_mb():
list_add_tail(&epi->rdlink, &ep->rdllist);
smp_mb();
if (waitqueue_active(&ep->wq))
wake_up(&ep->wp);
But let's make it simple, thus current patch replaces ep->wq.lock with the
ep->lock for wqueue modifications, thus wake up path always observes
activeness of the wqueue correcty.
Link: http://lkml.kernel.org/r/20200214170211.561524-1-rpenyaev@suse.de
Fixes: a218cc491420 ("epoll: use rwlock in order to reduce ep_poll_callback() contention")
References: https://bugzilla.kernel.org/show_bug.cgi?id=205933
Signed-off-by: Roman Penyaev <rpenyaev(a)suse.de>
Reported-by: Max Neunhoeffer <max(a)arangodb.com>
Bisected-by: Max Neunhoeffer <max(a)arangodb.com>
Tested-by: Max Neunhoeffer <max(a)arangodb.com>
Cc: Jakub Kicinski <kuba(a)kernel.org>
Cc: Christopher Kohlhoff <chris.kohlhoff(a)clearpool.io>
Cc: Davidlohr Bueso <dbueso(a)suse.de>
Cc: Jason Baron <jbaron(a)akamai.com>
Cc: <stable(a)vger.kernel.org> [5.1+]
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
fs/eventpoll.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
--- a/fs/eventpoll.c~epoll-fix-possible-lost-wakeup-on-epoll_ctl-path
+++ a/fs/eventpoll.c
@@ -1854,9 +1854,9 @@ fetch_events:
waiter = true;
init_waitqueue_entry(&wait, current);
- spin_lock_irq(&ep->wq.lock);
+ write_lock_irq(&ep->lock);
__add_wait_queue_exclusive(&ep->wq, &wait);
- spin_unlock_irq(&ep->wq.lock);
+ write_unlock_irq(&ep->lock);
}
for (;;) {
@@ -1904,9 +1904,9 @@ send_events:
goto fetch_events;
if (waiter) {
- spin_lock_irq(&ep->wq.lock);
+ write_lock_irq(&ep->lock);
__remove_wait_queue(&ep->wq, &wait);
- spin_unlock_irq(&ep->wq.lock);
+ write_unlock_irq(&ep->lock);
}
return res;
_
Patches currently in -mm which might be from rpenyaev(a)suse.de are
epoll-fix-possible-lost-wakeup-on-epoll_ctl-path.patch
kselftest-introduce-new-epoll-test-case.patch
This enables the sampling check in kernel/events/core.c's
perf_event_open, which returns the more appropriate -EOPNOTSUPP.
BEFORE:
$ sudo perf record -a -e instructions,l3_request_g1.caching_l3_cache_accesses true
Error:
The sys_perf_event_open() syscall returned with 22 (Invalid argument) for event (l3_request_g1.caching_l3_cache_accesses).
/bin/dmesg | grep -i perf may provide additional information.
With nothing relevant in dmesg.
AFTER:
$ sudo perf record -a -e instructions,l3_request_g1.caching_l3_cache_accesses true
Error:
l3_request_g1.caching_l3_cache_accesses: PMU Hardware doesn't support sampling/overflow-interrupts. Try 'perf stat'
Signed-off-by: Kim Phillips <kim.phillips(a)amd.com>
Cc: Alexander Shishkin <alexander.shishkin(a)linux.intel.com>
Cc: Arnaldo Carvalho de Melo <acme(a)kernel.org>
Cc: Borislav Petkov <bp(a)alien8.de>
Cc: "H. Peter Anvin" <hpa(a)zytor.com>
Cc: Ingo Molnar <mingo(a)kernel.org>
Cc: Ingo Molnar <mingo(a)redhat.com>
Cc: Jiri Olsa <jolsa(a)redhat.com>
Cc: Mark Rutland <mark.rutland(a)arm.com>
Cc: Michael Petlan <mpetlan(a)redhat.com>
Cc: Namhyung Kim <namhyung(a)kernel.org>
Cc: Peter Zijlstra <peterz(a)infradead.org>
Cc: Thomas Gleixner <tglx(a)linutronix.de>
Cc: linux-kernel(a)vger.kernel.org
Cc: x86(a)kernel.org
Cc: stable(a)vger.kernel.org
Fixes: c43ca5091a37 ("perf/x86/amd: Add support for AMD NB and L2I "uncore" counters")
---
arch/x86/events/amd/uncore.c | 17 +++++++----------
1 file changed, 7 insertions(+), 10 deletions(-)
diff --git a/arch/x86/events/amd/uncore.c b/arch/x86/events/amd/uncore.c
index a6ea07f2aa84..4d867a752f0e 100644
--- a/arch/x86/events/amd/uncore.c
+++ b/arch/x86/events/amd/uncore.c
@@ -190,15 +190,12 @@ static int amd_uncore_event_init(struct perf_event *event)
/*
* NB and Last level cache counters (MSRs) are shared across all cores
- * that share the same NB / Last level cache. Interrupts can be directed
- * to a single target core, however, event counts generated by processes
- * running on other cores cannot be masked out. So we do not support
- * sampling and per-thread events.
+ * that share the same NB / Last level cache. On family 16h and below,
+ * Interrupts can be directed to a single target core, however, event
+ * counts generated by processes running on other cores cannot be masked
+ * out. So we do not support sampling and per-thread events via
+ * CAP_NO_INTERRUPT, and we do not enable counter overflow interrupts:
*/
- if (is_sampling_event(event) || event->attach_state & PERF_ATTACH_TASK)
- return -EINVAL;
-
- /* and we do not enable counter overflow interrupts */
hwc->config = event->attr.config & AMD64_RAW_EVENT_MASK_NB;
hwc->idx = -1;
@@ -306,7 +303,7 @@ static struct pmu amd_nb_pmu = {
.start = amd_uncore_start,
.stop = amd_uncore_stop,
.read = amd_uncore_read,
- .capabilities = PERF_PMU_CAP_NO_EXCLUDE,
+ .capabilities = PERF_PMU_CAP_NO_EXCLUDE | PERF_PMU_CAP_NO_INTERRUPT,
};
static struct pmu amd_llc_pmu = {
@@ -317,7 +314,7 @@ static struct pmu amd_llc_pmu = {
.start = amd_uncore_start,
.stop = amd_uncore_stop,
.read = amd_uncore_read,
- .capabilities = PERF_PMU_CAP_NO_EXCLUDE,
+ .capabilities = PERF_PMU_CAP_NO_EXCLUDE | PERF_PMU_CAP_NO_INTERRUPT,
};
static struct amd_uncore *amd_uncore_alloc(unsigned int cpu)
--
2.25.0
The patch titled
Subject: mm, numa: fix bad pmd by atomically check for pmd_trans_huge when marking page tables prot_numa
has been added to the -mm tree. Its filename is
mm-numa-fix-bad-pmd-by-atomically-check-for-pmd_trans_huge-when-marking-page-tables-prot_numa.patch
This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/mm-numa-fix-bad-pmd-by-atomically-…
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/mm-numa-fix-bad-pmd-by-atomically-…
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next and is updated
there every 3-4 working days
------------------------------------------------------
From: Mel Gorman <mgorman(a)techsingularity.net>
Subject: mm, numa: fix bad pmd by atomically check for pmd_trans_huge when marking page tables prot_numa
: A user reported a bug against a distribution kernel while running a
: proprietary workload described as "memory intensive that is not swapping"
: that is expected to apply to mainline kernels. The workload is
: read/write/modifying ranges of memory and checking the contents. They
: reported that within a few hours that a bad PMD would be reported followed
: by a memory corruption where expected data was all zeros. A partial
: report of the bad PMD looked like
:
: [ 5195.338482] ../mm/pgtable-generic.c:33: bad pmd ffff8888157ba008(000002e0396009e2)
: [ 5195.341184] ------------[ cut here ]------------
: [ 5195.356880] kernel BUG at ../mm/pgtable-generic.c:35!
: ....
: [ 5195.410033] Call Trace:
: [ 5195.410471] [<ffffffff811bc75d>] change_protection_range+0x7dd/0x930
: [ 5195.410716] [<ffffffff811d4be8>] change_prot_numa+0x18/0x30
: [ 5195.410918] [<ffffffff810adefe>] task_numa_work+0x1fe/0x310
: [ 5195.411200] [<ffffffff81098322>] task_work_run+0x72/0x90
: [ 5195.411246] [<ffffffff81077139>] exit_to_usermode_loop+0x91/0xc2
: [ 5195.411494] [<ffffffff81003a51>] prepare_exit_to_usermode+0x31/0x40
: [ 5195.411739] [<ffffffff815e56af>] retint_user+0x8/0x10
:
: Decoding revealed that the PMD was a valid prot_numa PMD and the bad PMD
: was a false detection. The bug does not trigger if automatic NUMA
: balancing or transparent huge pages is disabled.
:
: The bug is due a race in change_pmd_range between a pmd_trans_huge and
: pmd_nond_or_clear_bad check without any locks held. During the
: pmd_trans_huge check, a parallel protection update under lock can have
: cleared the PMD and filled it with a prot_numa entry between the transhuge
: check and the pmd_none_or_clear_bad check.
:
: While this could be fixed with heavy locking, it's only necessary to make
: a copy of the PMD on the stack during change_pmd_range and avoid races. A
: new helper is created for this as the check if quite subtle and the
: existing similar helpful is not suitable. This passed 154 hours of
: testing (usually triggers between 20 minutes and 24 hours) without
: detecting bad PMDs or corruption. A basic test of an autonuma-intensive
: workload showed no significant change in behaviour.
Although Mel withdrew the patch on the face of LKML comment
https://lkml.org/lkml/2017/4/10/922 the race window aforementioned is
still open, and we have reports of Linpack test reporting bad residuals
after the bad PMD warning is observed. In addition to that, bad
rss-counter and non-zero pgtables assertions are triggered on mm teardown
for the task hitting the bad PMD.
host kernel: mm/pgtable-generic.c:40: bad pmd 00000000b3152f68(8000000d2d2008e7)
....
host kernel: BUG: Bad rss-counter state mm:00000000b583043d idx:1 val:512
host kernel: BUG: non-zero pgtables_bytes on freeing mm: 4096
The issue is observed on a v4.18-based distribution kernel, but the race
window is expected to be applicable to mainline kernels, as well.
Link: http://lkml.kernel.org/r/20200216191800.22423-1-aquini@redhat.com
Signed-off-by: Mel Gorman <mgorman(a)techsingularity.net>
Signed-off-by: Rafael Aquini <aquini(a)redhat.com>
Cc: Michal Hocko <mhocko(a)suse.com>
Cc: Vlastimil Babka <vbabka(a)suse.cz>
Cc: "Kirill A. Shutemov" <kirill.shutemov(a)linux.intel.com>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
mm/mprotect.c | 38 ++++++++++++++++++++++++++++++++++++--
1 file changed, 36 insertions(+), 2 deletions(-)
--- a/mm/mprotect.c~mm-numa-fix-bad-pmd-by-atomically-check-for-pmd_trans_huge-when-marking-page-tables-prot_numa
+++ a/mm/mprotect.c
@@ -161,6 +161,31 @@ static unsigned long change_pte_range(st
return pages;
}
+/*
+ * Used when setting automatic NUMA hinting protection where it is
+ * critical that a numa hinting PMD is not confused with a bad PMD.
+ */
+static inline int pmd_none_or_clear_bad_unless_trans_huge(pmd_t *pmd)
+{
+ pmd_t pmdval = pmd_read_atomic(pmd);
+
+ /* See pmd_none_or_trans_huge_or_clear_bad for info on barrier */
+#ifdef CONFIG_TRANSPARENT_HUGEPAGE
+ barrier();
+#endif
+
+ if (pmd_none(pmdval))
+ return 1;
+ if (pmd_trans_huge(pmdval))
+ return 0;
+ if (unlikely(pmd_bad(pmdval))) {
+ pmd_clear_bad(pmd);
+ return 1;
+ }
+
+ return 0;
+}
+
static inline unsigned long change_pmd_range(struct vm_area_struct *vma,
pud_t *pud, unsigned long addr, unsigned long end,
pgprot_t newprot, int dirty_accountable, int prot_numa)
@@ -178,8 +203,17 @@ static inline unsigned long change_pmd_r
unsigned long this_pages;
next = pmd_addr_end(addr, end);
- if (!is_swap_pmd(*pmd) && !pmd_trans_huge(*pmd) && !pmd_devmap(*pmd)
- && pmd_none_or_clear_bad(pmd))
+
+ /*
+ * Automatic NUMA balancing walks the tables with mmap_sem
+ * held for read. It's possible a parallel update to occur
+ * between pmd_trans_huge() and a pmd_none_or_clear_bad()
+ * check leading to a false positive and clearing.
+ * Hence, it's ecessary to atomically read the PMD value
+ * for all the checks.
+ */
+ if (!is_swap_pmd(*pmd) && !pmd_devmap(*pmd) &&
+ pmd_none_or_clear_bad_unless_trans_huge(pmd))
goto next;
/* invoke the mmu notifier if the pmd is populated */
_
Patches currently in -mm which might be from mgorman(a)techsingularity.net are
mm-numa-fix-bad-pmd-by-atomically-check-for-pmd_trans_huge-when-marking-page-tables-prot_numa.patch
The patch titled
Subject: lib/stackdepot.c: fix global out-of-bounds in stack_slabs
has been added to the -mm tree. Its filename is
lib-stackdepot-fix-global-out-of-bounds-in-stack_slabs.patch
This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/lib-stackdepot-fix-global-out-of-b…
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/lib-stackdepot-fix-global-out-of-b…
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next and is updated
there every 3-4 working days
------------------------------------------------------
From: Alexander Potapenko <glider(a)google.com>
Subject: lib/stackdepot.c: fix global out-of-bounds in stack_slabs
Walter Wu has reported a potential case in which init_stack_slab() is
called after stack_slabs[STACK_ALLOC_MAX_SLABS - 1] has already been
initialized. In that case init_stack_slab() will overwrite
stack_slabs[STACK_ALLOC_MAX_SLABS], which may result in a memory
corruption.
Link: http://lkml.kernel.org/r/20200218102950.260263-1-glider@google.com
Fixes: cd11016e5f521 ("mm, kasan: stackdepot implementation. Enable stackdepot for SLAB")
Signed-off-by: Alexander Potapenko <glider(a)google.com>
Reported-by: Walter Wu <walter-zh.wu(a)mediatek.com>
Cc: Dmitry Vyukov <dvyukov(a)google.com>
Cc: Matthias Brugger <matthias.bgg(a)gmail.com>
Cc: Thomas Gleixner <tglx(a)linutronix.de>
Cc: Josh Poimboeuf <jpoimboe(a)redhat.com>
Cc: Kate Stewart <kstewart(a)linuxfoundation.org>
Cc: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
lib/stackdepot.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
--- a/lib/stackdepot.c~lib-stackdepot-fix-global-out-of-bounds-in-stack_slabs
+++ a/lib/stackdepot.c
@@ -83,15 +83,19 @@ static bool init_stack_slab(void **preal
return true;
if (stack_slabs[depot_index] == NULL) {
stack_slabs[depot_index] = *prealloc;
+ *prealloc = NULL;
} else {
- stack_slabs[depot_index + 1] = *prealloc;
+ /* If this is the last depot slab, do not touch the next one. */
+ if (depot_index + 1 < STACK_ALLOC_MAX_SLABS) {
+ stack_slabs[depot_index + 1] = *prealloc;
+ *prealloc = NULL;
+ }
/*
* This smp_store_release pairs with smp_load_acquire() from
* |next_slab_inited| above and in stack_depot_save().
*/
smp_store_release(&next_slab_inited, 1);
}
- *prealloc = NULL;
return true;
}
_
Patches currently in -mm which might be from glider(a)google.com are
lib-stackdepot-fix-global-out-of-bounds-in-stack_slabs.patch
I'm announcing the release of the 5.5.5 kernel.
All users of the 5.5 kernel series must upgrade.
The updated 5.5.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.5.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2
arch/arm/mach-npcm/Kconfig | 2
arch/arm64/boot/dts/arm/fvp-base-revc.dts | 8 -
arch/arm64/kernel/process.c | 7 +
arch/s390/boot/uv.c | 3
arch/s390/include/asm/timex.h | 2
arch/x86/events/amd/core.c | 1
arch/x86/events/intel/ds.c | 2
arch/x86/kvm/mmu/paging_tmpl.h | 2
arch/x86/kvm/vmx/nested.c | 28 +++++
arch/x86/kvm/vmx/vmx.c | 3
arch/x86/kvm/x86.c | 8 +
drivers/acpi/acpica/achware.h | 2
drivers/acpi/acpica/evxfgpe.c | 32 ++++++
drivers/acpi/acpica/hwgpe.c | 71 ++++++++++++++
drivers/acpi/ec.c | 44 +++++---
drivers/acpi/sleep.c | 50 +++++++--
drivers/bus/moxtet.c | 2
drivers/char/ipmi/ipmb_dev_int.c | 2
drivers/edac/edac_mc.c | 12 --
drivers/edac/edac_mc_sysfs.c | 18 ---
drivers/gpio/gpio-xilinx.c | 5
drivers/gpio/gpiolib-of.c | 4
drivers/gpio/gpiolib.c | 11 ++
drivers/gpu/drm/amd/powerplay/inc/smu_v11_0_pptable.h | 46 ++++++---
drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 22 ++--
drivers/gpu/drm/drm_dp_mst_topology.c | 3
drivers/gpu/drm/i915/i915_pmu.c | 12 ++
drivers/gpu/drm/panfrost/panfrost_drv.c | 1
drivers/gpu/drm/panfrost/panfrost_gem.h | 6 +
drivers/gpu/drm/panfrost/panfrost_gem_shrinker.c | 3
drivers/gpu/drm/panfrost/panfrost_job.c | 7 +
drivers/gpu/drm/sun4i/sun4i_drv.c | 1
drivers/gpu/drm/vgem/vgem_drv.c | 9 +
drivers/hwmon/pmbus/ltc2978.c | 4
drivers/infiniband/core/security.c | 24 +---
drivers/infiniband/core/user_mad.c | 5
drivers/infiniband/core/uverbs_cmd.c | 15 +-
drivers/infiniband/hw/cxgb4/cm.c | 4
drivers/infiniband/hw/cxgb4/qp.c | 4
drivers/infiniband/hw/hfi1/affinity.c | 2
drivers/infiniband/hw/hfi1/file_ops.c | 52 ++++++----
drivers/infiniband/hw/hfi1/hfi.h | 5
drivers/infiniband/hw/hfi1/user_exp_rcv.c | 5
drivers/infiniband/hw/hfi1/user_sdma.c | 17 ++-
drivers/infiniband/hw/mlx5/qp.c | 9 +
drivers/infiniband/sw/rdmavt/qp.c | 84 ++++++++++------
drivers/infiniband/sw/rxe/rxe_comp.c | 8 -
drivers/input/mouse/synaptics.c | 4
drivers/input/touchscreen/ili210x.c | 2
drivers/mmc/core/host.c | 11 --
drivers/mmc/core/slot-gpio.c | 3
drivers/mmc/host/pxamci.c | 8 -
drivers/mmc/host/sdhci-esdhc-imx.c | 3
drivers/nvme/host/core.c | 2
drivers/s390/crypto/pkey_api.c | 2
drivers/spmi/spmi-pmic-arb.c | 4
fs/btrfs/disk-io.c | 1
fs/btrfs/extent_map.c | 11 ++
fs/btrfs/ref-verify.c | 5
fs/btrfs/super.c | 2
fs/ceph/super.c | 8 -
fs/cifs/cifsfs.c | 6 -
fs/cifs/smb2ops.c | 35 ++++++
fs/ext4/block_validity.c | 1
fs/ext4/dir.c | 14 +-
fs/ext4/ext4.h | 5
fs/ext4/inode.c | 12 ++
fs/ext4/mmp.c | 12 +-
fs/ext4/namei.c | 7 +
fs/ext4/super.c | 55 ++++++----
fs/io-wq.c | 8 +
fs/io-wq.h | 4
fs/io_uring.c | 53 +++-------
fs/jbd2/commit.c | 46 ++++-----
fs/jbd2/transaction.c | 10 +
fs/nfs/delegation.c | 47 ++++++---
fs/nfs/nfs4proc.c | 2
include/acpi/acpixf.h | 1
include/linux/gpio/consumer.h | 7 +
include/linux/suspend.h | 2
include/net/mac80211.h | 11 --
kernel/cgroup/cgroup.c | 13 +-
kernel/power/suspend.c | 9 -
kernel/sched/core.c | 2
net/mac80211/cfg.c | 2
net/mac80211/mlme.c | 8 -
net/mac80211/tx.c | 2
net/sunrpc/xprtrdma/frwr_ops.c | 13 +-
sound/core/pcm_native.c | 3
sound/pci/hda/patch_realtek.c | 4
sound/usb/clock.c | 91 ++++++++++++------
sound/usb/clock.h | 4
sound/usb/format.c | 3
sound/usb/mixer.c | 12 +-
sound/usb/quirks.c | 1
tools/perf/util/stat-shadow.c | 6 -
97 files changed, 841 insertions(+), 405 deletions(-)
Alex Deucher (2):
drm/amdgpu: update smu_v11_0_pptable.h
drm/amdgpu:/navi10: use the ODCAP enum to index the caps array
Alexander Tsoy (1):
ALSA: usb-audio: Add clock validity quirk for Denon MC7000/MCX8000
Andreas Dilger (1):
ext4: don't assume that mmp_nodename/bdevname have NUL
Arvind Sankar (1):
ALSA: usb-audio: Apply sample rate quirk for Audioengine D1
Avihai Horon (1):
RDMA/core: Fix invalid memory access in spec_filter_size
Benjamin Tissoires (1):
Input: synaptics - remove the LEN0049 dmi id from topbuttonpad list
Boris Brezillon (1):
drm/panfrost: Make sure the shrinker does not reclaim referenced BOs
Chengguang Xu (1):
ext4: choose hardlimit when softlimit is larger than hardlimit in ext4_statfs_project()
Chris Wilson (1):
drm/i915/pmu: Correct the rc6 offset upon enabling
Christian Borntraeger (1):
s390/uv: Fix handling of length extensions
Chuck Lever (1):
xprtrdma: Fix DMA scatter-gather list mapping imbalance
Colin Ian King (1):
drivers: ipmi: fix off-by-one bounds check that leads to a out-of-bounds write
Daniel Vetter (1):
drm/vgem: Close use-after-free race in vgem_gem_create
David Sterba (2):
btrfs: print message when tree-log replay starts
btrfs: log message when rw remount is attempted with unclean tree-log
Filipe Manana (1):
Btrfs: fix race between using extent maps and merging them
Gaurav Agrawal (1):
Input: synaptics - enable SMBus on ThinkPad L470
Greg Kroah-Hartman (1):
Linux 5.5.5
Harald Freudenberger (1):
s390/pkey: fix missing length of protected key on return
Jan Kara (1):
ext4: fix checksum errors with indexed dirs
Jens Axboe (2):
io_uring: retry raw bdev writes if we hit -EOPNOTSUPP
io-wq: add support for inheriting ->fs
Jernej Skrabec (1):
Revert "drm/sun4i: drv: Allow framebuffer modifiers in mode config"
Johannes Berg (1):
mac80211: use more bits for ack_frame_id
José Roberto de Souza (1):
drm/mst: Fix possible NULL pointer dereference in drm_dp_mst_process_up_req()
Kaike Wan (2):
IB/hfi1: Acquire lock to release TID entries when user file is closed
IB/rdmavt: Reset all QPs when the device is shut down
Kailang Yang (1):
ALSA: hda/realtek - Add more codec supported Headset Button
Kamal Heib (1):
RDMA/hfi1: Fix memory leak in _dev_comp_vect_mappings_create
Kan Liang (1):
perf/x86/intel: Fix inaccurate period in context switch for auto-reload
Kim Phillips (2):
perf/x86/amd: Add missing L2 misses event spec to AMD Family 17h's event map
perf stat: Don't report a null stalled cycles per insn metric
Krishnamraju Eraparaju (1):
RDMA/iw_cxgb4: initiate CLOSE when entering TERM
Krzysztof Kozlowski (1):
ARM: npcm: Bring back GPIOLIB support
Leon Romanovsky (1):
RDMA/core: Fix protection fault in get_pkey_idx_qp_list
Luca Weiss (1):
Input: ili210x - fix return value of is_visible function
Lyude Paul (1):
Input: synaptics - switch T470s to RMI4 by default
Marc Zyngier (1):
arm64: dts: fast models: Fix FVP PCI interrupt-map property
Marek Behún (1):
bus: moxtet: fix potential stack buffer overflow
Mark Zhang (1):
IB/mlx5: Return failure when rts2rts_qp_counters_set_id is not supported
Michał Mirosław (2):
gpio: add gpiod_toggle_active_low()
mmc: core: Rework wp-gpio handling
Mike Jones (1):
hwmon: (pmbus/ltc2978) Fix PMBus polling of MFR_COMMON definitions.
Mike Marciniszyn (1):
IB/hfi1: Close window for pq and request coliding
Nathan Chancellor (1):
s390/time: Fix clk type in get_tod_clock
Olga Kornievskaia (1):
NFSv4.1 make cachethis=no for writes
Oliver Upton (2):
KVM: x86: Mask off reserved bit from #DB exception payload
KVM: nVMX: Handle pending #DB when injecting INIT VM-exit
Paul Thomas (1):
gpio: xilinx: Fix bug where the wrong GPIO register is written to
Pavel Begunkov (1):
io_uring: fix deferred req iovec leak
Petr Pavlu (1):
cifs: fix mount option display for sec=krb5i
Qais Yousef (1):
sched/uclamp: Reject negative values in cpu_uclamp_write()
Rafael J. Wysocki (4):
ACPI: EC: Fix flushing of pending work
ACPI: PM: s2idle: Avoid possible race related to the EC GPE
ACPICA: Introduce acpi_any_gpe_status_set()
ACPI: PM: s2idle: Prevent spurious SCIs from waking up the system
Robert Richter (2):
EDAC/sysfs: Remove csrow objects on errors
EDAC/mc: Fix use-after-free and memleaks during device removal
Ronnie Sahlberg (1):
cifs: make sure we do not overflow the max EA buffer size
Sara Sharon (1):
mac80211: fix quiet mode activation in action frames
Sean Christopherson (2):
KVM: nVMX: Use correct root level for nested EPT shadow page tables
KVM: x86/mmu: Fix struct guest_walker arrays for 5-level paging
Shijie Luo (1):
ext4: add cond_resched() to ext4_protect_reserved_inode
Stephen Boyd (1):
spmi: pmic-arb: Set lockdep class for hierarchical irq domains
Takashi Iwai (3):
ALSA: usb-audio: Fix UAC2/3 effect unit parsing
ALSA: pcm: Fix double hw_free calls
ALSA: hda/realtek - Fix silent output on MSI-GL73
Tejun Heo (1):
cgroup: init_tasks shouldn't be linked to the root cgroup
Theodore Ts'o (2):
ext4: fix support for inode sizes > 1024 bytes
ext4: improve explanation of a mount failure caused by a misconfigured kernel
Trond Myklebust (2):
NFSv4: Ensure the delegation cred is pinned when we call delegreturn
NFSv4: Add accounting for the number of active delegations held
Wenwen Wang (1):
btrfs: ref-verify: fix memory leaks
Will Deacon (1):
arm64: ssbs: Fix context-switch when SSBS is present on all CPUs
Xiubo Li (1):
ceph: noacl mount option is effectively ignored
Yi Zhang (1):
nvme: fix the parameter order for nvme_get_log in nvme_get_fw_slot_info
Yonatan Cohen (1):
IB/umad: Fix kernel crash while unloading ib_umad
Zhu Yanjun (1):
RDMA/rxe: Fix soft lockup problem due to using tasklets in softirq
zhangyi (F) (2):
jbd2: move the clearing of b_modified flag to the journal_unmap_buffer()
jbd2: do not clear the BH_Mapped flag when forgetting a metadata buffer
I'm announcing the release of the 5.4.21 kernel.
All users of the 5.4 kernel series must upgrade.
The updated 5.4.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.4.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2
arch/arm/mach-npcm/Kconfig | 2
arch/arm64/boot/dts/arm/fvp-base-revc.dts | 8 -
arch/arm64/kernel/process.c | 7 +
arch/s390/boot/uv.c | 3
arch/s390/include/asm/timex.h | 2
arch/x86/events/amd/core.c | 1
arch/x86/events/intel/ds.c | 2
arch/x86/kvm/paging_tmpl.h | 2
arch/x86/kvm/vmx/vmx.c | 3
arch/x86/kvm/x86.c | 8 +
drivers/acpi/acpica/achware.h | 2
drivers/acpi/acpica/evxfgpe.c | 32 +++++++
drivers/acpi/acpica/hwgpe.c | 71 ++++++++++++++++
drivers/acpi/ec.c | 44 ++++++----
drivers/acpi/sleep.c | 50 ++++++++---
drivers/bus/moxtet.c | 2
drivers/char/ipmi/ipmb_dev_int.c | 2
drivers/edac/edac_mc.c | 12 --
drivers/edac/edac_mc_sysfs.c | 18 ----
drivers/gpio/gpio-xilinx.c | 5 -
drivers/gpio/gpiolib-of.c | 4
drivers/gpio/gpiolib.c | 11 ++
drivers/gpu/drm/panfrost/panfrost_drv.c | 1
drivers/gpu/drm/panfrost/panfrost_gem.h | 6 +
drivers/gpu/drm/panfrost/panfrost_gem_shrinker.c | 3
drivers/gpu/drm/panfrost/panfrost_job.c | 7 +
drivers/gpu/drm/sun4i/sun4i_drv.c | 1
drivers/gpu/drm/vgem/vgem_drv.c | 9 +-
drivers/hwmon/pmbus/ltc2978.c | 4
drivers/infiniband/core/security.c | 24 ++---
drivers/infiniband/core/user_mad.c | 5 -
drivers/infiniband/core/uverbs_cmd.c | 15 +--
drivers/infiniband/hw/cxgb4/cm.c | 4
drivers/infiniband/hw/cxgb4/qp.c | 4
drivers/infiniband/hw/hfi1/affinity.c | 2
drivers/infiniband/hw/hfi1/file_ops.c | 52 +++++++-----
drivers/infiniband/hw/hfi1/hfi.h | 5 -
drivers/infiniband/hw/hfi1/user_exp_rcv.c | 5 -
drivers/infiniband/hw/hfi1/user_sdma.c | 17 ++-
drivers/infiniband/hw/mlx5/qp.c | 9 +-
drivers/infiniband/sw/rdmavt/qp.c | 84 +++++++++++--------
drivers/infiniband/sw/rxe/rxe_comp.c | 8 -
drivers/input/mouse/synaptics.c | 4
drivers/mmc/core/host.c | 11 --
drivers/mmc/core/slot-gpio.c | 3
drivers/mmc/host/pxamci.c | 8 -
drivers/mmc/host/sdhci-esdhc-imx.c | 3
drivers/nvme/host/core.c | 2
drivers/s390/crypto/pkey_api.c | 2
drivers/spmi/spmi-pmic-arb.c | 4
fs/btrfs/disk-io.c | 1
fs/btrfs/extent_map.c | 11 ++
fs/btrfs/ref-verify.c | 5 +
fs/btrfs/super.c | 2
fs/cifs/cifsfs.c | 6 +
fs/cifs/smb2ops.c | 35 +++++++-
fs/ext4/block_validity.c | 1
fs/ext4/dir.c | 14 +--
fs/ext4/ext4.h | 5 -
fs/ext4/inode.c | 12 ++
fs/ext4/mmp.c | 12 +-
fs/ext4/namei.c | 7 +
fs/ext4/super.c | 55 +++++++-----
fs/jbd2/commit.c | 46 +++++-----
fs/jbd2/transaction.c | 10 +-
fs/nfs/nfs4proc.c | 2
include/acpi/acpixf.h | 1
include/linux/gpio/consumer.h | 7 +
include/linux/suspend.h | 2
kernel/power/suspend.c | 9 +-
kernel/sched/core.c | 2
net/mac80211/mlme.c | 8 -
net/sunrpc/xprtrdma/frwr_ops.c | 13 +--
sound/pci/hda/patch_realtek.c | 4
sound/usb/clock.c | 99 +++++++++++++++--------
sound/usb/clock.h | 4
sound/usb/format.c | 3
sound/usb/mixer.c | 12 ++
sound/usb/quirks.c | 1
tools/perf/util/stat-shadow.c | 6 -
81 files changed, 677 insertions(+), 313 deletions(-)
Alexander Tsoy (1):
ALSA: usb-audio: Add clock validity quirk for Denon MC7000/MCX8000
Andreas Dilger (1):
ext4: don't assume that mmp_nodename/bdevname have NUL
Arvind Sankar (1):
ALSA: usb-audio: Apply sample rate quirk for Audioengine D1
Avihai Horon (1):
RDMA/core: Fix invalid memory access in spec_filter_size
Benjamin Tissoires (1):
Input: synaptics - remove the LEN0049 dmi id from topbuttonpad list
Boris Brezillon (1):
drm/panfrost: Make sure the shrinker does not reclaim referenced BOs
Chengguang Xu (1):
ext4: choose hardlimit when softlimit is larger than hardlimit in ext4_statfs_project()
Christian Borntraeger (1):
s390/uv: Fix handling of length extensions
Chuck Lever (1):
xprtrdma: Fix DMA scatter-gather list mapping imbalance
Colin Ian King (1):
drivers: ipmi: fix off-by-one bounds check that leads to a out-of-bounds write
Daniel Vetter (1):
drm/vgem: Close use-after-free race in vgem_gem_create
David Sterba (2):
btrfs: print message when tree-log replay starts
btrfs: log message when rw remount is attempted with unclean tree-log
Filipe Manana (1):
Btrfs: fix race between using extent maps and merging them
Gaurav Agrawal (1):
Input: synaptics - enable SMBus on ThinkPad L470
Greg Kroah-Hartman (1):
Linux 5.4.21
Harald Freudenberger (1):
s390/pkey: fix missing length of protected key on return
Jan Kara (1):
ext4: fix checksum errors with indexed dirs
Jernej Skrabec (1):
Revert "drm/sun4i: drv: Allow framebuffer modifiers in mode config"
Kaike Wan (2):
IB/hfi1: Acquire lock to release TID entries when user file is closed
IB/rdmavt: Reset all QPs when the device is shut down
Kailang Yang (1):
ALSA: hda/realtek - Add more codec supported Headset Button
Kamal Heib (1):
RDMA/hfi1: Fix memory leak in _dev_comp_vect_mappings_create
Kan Liang (1):
perf/x86/intel: Fix inaccurate period in context switch for auto-reload
Kim Phillips (2):
perf/x86/amd: Add missing L2 misses event spec to AMD Family 17h's event map
perf stat: Don't report a null stalled cycles per insn metric
Krishnamraju Eraparaju (1):
RDMA/iw_cxgb4: initiate CLOSE when entering TERM
Krzysztof Kozlowski (1):
ARM: npcm: Bring back GPIOLIB support
Leon Romanovsky (1):
RDMA/core: Fix protection fault in get_pkey_idx_qp_list
Lyude Paul (1):
Input: synaptics - switch T470s to RMI4 by default
Marc Zyngier (1):
arm64: dts: fast models: Fix FVP PCI interrupt-map property
Marek Behún (1):
bus: moxtet: fix potential stack buffer overflow
Mark Zhang (1):
IB/mlx5: Return failure when rts2rts_qp_counters_set_id is not supported
Michał Mirosław (2):
gpio: add gpiod_toggle_active_low()
mmc: core: Rework wp-gpio handling
Mike Jones (1):
hwmon: (pmbus/ltc2978) Fix PMBus polling of MFR_COMMON definitions.
Mike Marciniszyn (1):
IB/hfi1: Close window for pq and request coliding
Nathan Chancellor (1):
s390/time: Fix clk type in get_tod_clock
Olga Kornievskaia (1):
NFSv4.1 make cachethis=no for writes
Oliver Upton (1):
KVM: x86: Mask off reserved bit from #DB exception payload
Paul Thomas (1):
gpio: xilinx: Fix bug where the wrong GPIO register is written to
Petr Pavlu (1):
cifs: fix mount option display for sec=krb5i
Qais Yousef (1):
sched/uclamp: Reject negative values in cpu_uclamp_write()
Rafael J. Wysocki (4):
ACPI: EC: Fix flushing of pending work
ACPI: PM: s2idle: Avoid possible race related to the EC GPE
ACPICA: Introduce acpi_any_gpe_status_set()
ACPI: PM: s2idle: Prevent spurious SCIs from waking up the system
Robert Richter (2):
EDAC/sysfs: Remove csrow objects on errors
EDAC/mc: Fix use-after-free and memleaks during device removal
Ronnie Sahlberg (1):
cifs: make sure we do not overflow the max EA buffer size
Sara Sharon (1):
mac80211: fix quiet mode activation in action frames
Saurav Girepunje (1):
ALSA: usb-audio: sound: usb: usb true/false for bool return type
Sean Christopherson (2):
KVM: nVMX: Use correct root level for nested EPT shadow page tables
KVM: x86/mmu: Fix struct guest_walker arrays for 5-level paging
Shijie Luo (1):
ext4: add cond_resched() to ext4_protect_reserved_inode
Stephen Boyd (1):
spmi: pmic-arb: Set lockdep class for hierarchical irq domains
Takashi Iwai (2):
ALSA: usb-audio: Fix UAC2/3 effect unit parsing
ALSA: hda/realtek - Fix silent output on MSI-GL73
Theodore Ts'o (2):
ext4: fix support for inode sizes > 1024 bytes
ext4: improve explanation of a mount failure caused by a misconfigured kernel
Wenwen Wang (1):
btrfs: ref-verify: fix memory leaks
Will Deacon (1):
arm64: ssbs: Fix context-switch when SSBS is present on all CPUs
Yi Zhang (1):
nvme: fix the parameter order for nvme_get_log in nvme_get_fw_slot_info
Yonatan Cohen (1):
IB/umad: Fix kernel crash while unloading ib_umad
Zhu Yanjun (1):
RDMA/rxe: Fix soft lockup problem due to using tasklets in softirq
zhangyi (F) (2):
jbd2: move the clearing of b_modified flag to the journal_unmap_buffer()
jbd2: do not clear the BH_Mapped flag when forgetting a metadata buffer
I'm announcing the release of the 4.19.105 kernel.
All users of the 4.19 kernel series must upgrade.
The updated 4.19.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.19.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2
arch/arm/mach-npcm/Kconfig | 2
arch/arm64/kernel/cpufeature.c | 52 +++++++++++++--
arch/arm64/kernel/fpsimd.c | 20 +++++-
arch/arm64/kernel/process.c | 7 ++
arch/arm64/kvm/hyp/switch.c | 10 ++-
arch/s390/include/asm/timex.h | 2
arch/x86/events/amd/core.c | 1
arch/x86/events/intel/ds.c | 2
arch/x86/kvm/paging_tmpl.h | 2
arch/x86/kvm/vmx/vmx.c | 3
drivers/hwmon/pmbus/ltc2978.c | 4 -
drivers/infiniband/core/security.c | 24 ++-----
drivers/infiniband/core/uverbs_cmd.c | 15 ++--
drivers/infiniband/hw/hfi1/affinity.c | 2
drivers/infiniband/hw/hfi1/file_ops.c | 52 +++++++++------
drivers/infiniband/hw/hfi1/hfi.h | 5 +
drivers/infiniband/hw/hfi1/user_exp_rcv.c | 5 -
drivers/infiniband/hw/hfi1/user_sdma.c | 17 +++--
drivers/infiniband/sw/rdmavt/qp.c | 84 +++++++++++++++----------
drivers/infiniband/sw/rxe/rxe_comp.c | 8 +-
drivers/input/mouse/synaptics.c | 4 -
drivers/nvme/host/core.c | 2
fs/btrfs/disk-io.c | 1
fs/btrfs/extent_map.c | 11 +++
fs/btrfs/ref-verify.c | 5 +
fs/btrfs/super.c | 2
fs/ext4/block_validity.c | 1
fs/ext4/dir.c | 14 ++--
fs/ext4/ext4.h | 5 +
fs/ext4/inode.c | 12 +++
fs/ext4/mmp.c | 12 ++-
fs/ext4/namei.c | 7 ++
fs/ext4/super.c | 32 ++++-----
fs/jbd2/commit.c | 46 +++++++------
fs/jbd2/transaction.c | 10 +--
fs/nfs/nfs4proc.c | 2
sound/pci/hda/patch_realtek.c | 1
sound/usb/clock.c | 99 ++++++++++++++++++++----------
sound/usb/clock.h | 4 -
sound/usb/format.c | 3
sound/usb/mixer.c | 12 +++
sound/usb/quirks.c | 1
43 files changed, 404 insertions(+), 201 deletions(-)
Alexander Tsoy (1):
ALSA: usb-audio: Add clock validity quirk for Denon MC7000/MCX8000
Andreas Dilger (1):
ext4: don't assume that mmp_nodename/bdevname have NUL
Arvind Sankar (1):
ALSA: usb-audio: Apply sample rate quirk for Audioengine D1
Avihai Horon (1):
RDMA/core: Fix invalid memory access in spec_filter_size
Benjamin Tissoires (1):
Input: synaptics - remove the LEN0049 dmi id from topbuttonpad list
David Sterba (2):
btrfs: print message when tree-log replay starts
btrfs: log message when rw remount is attempted with unclean tree-log
Filipe Manana (1):
Btrfs: fix race between using extent maps and merging them
Gaurav Agrawal (1):
Input: synaptics - enable SMBus on ThinkPad L470
Greg Kroah-Hartman (1):
Linux 4.19.105
Jan Kara (1):
ext4: fix checksum errors with indexed dirs
Kaike Wan (2):
IB/hfi1: Acquire lock to release TID entries when user file is closed
IB/rdmavt: Reset all QPs when the device is shut down
Kamal Heib (1):
RDMA/hfi1: Fix memory leak in _dev_comp_vect_mappings_create
Kan Liang (1):
perf/x86/intel: Fix inaccurate period in context switch for auto-reload
Kim Phillips (1):
perf/x86/amd: Add missing L2 misses event spec to AMD Family 17h's event map
Krzysztof Kozlowski (1):
ARM: npcm: Bring back GPIOLIB support
Leon Romanovsky (1):
RDMA/core: Fix protection fault in get_pkey_idx_qp_list
Lyude Paul (1):
Input: synaptics - switch T470s to RMI4 by default
Mike Jones (1):
hwmon: (pmbus/ltc2978) Fix PMBus polling of MFR_COMMON definitions.
Mike Marciniszyn (1):
IB/hfi1: Close window for pq and request coliding
Nathan Chancellor (1):
s390/time: Fix clk type in get_tod_clock
Olga Kornievskaia (1):
NFSv4.1 make cachethis=no for writes
Saurav Girepunje (1):
ALSA: usb-audio: sound: usb: usb true/false for bool return type
Sean Christopherson (2):
KVM: nVMX: Use correct root level for nested EPT shadow page tables
KVM: x86/mmu: Fix struct guest_walker arrays for 5-level paging
Shijie Luo (1):
ext4: add cond_resched() to ext4_protect_reserved_inode
Suzuki K Poulose (2):
arm64: cpufeature: Set the FP/SIMD compat HWCAP bits properly
arm64: nofpsmid: Handle TIF_FOREIGN_FPSTATE flag cleanly
Takashi Iwai (2):
ALSA: usb-audio: Fix UAC2/3 effect unit parsing
ALSA: hda/realtek - Fix silent output on MSI-GL73
Theodore Ts'o (2):
ext4: fix support for inode sizes > 1024 bytes
ext4: improve explanation of a mount failure caused by a misconfigured kernel
Wenwen Wang (1):
btrfs: ref-verify: fix memory leaks
Will Deacon (1):
arm64: ssbs: Fix context-switch when SSBS is present on all CPUs
Yi Zhang (1):
nvme: fix the parameter order for nvme_get_log in nvme_get_fw_slot_info
Zhu Yanjun (1):
RDMA/rxe: Fix soft lockup problem due to using tasklets in softirq
zhangyi (F) (2):
jbd2: move the clearing of b_modified flag to the journal_unmap_buffer()
jbd2: do not clear the BH_Mapped flag when forgetting a metadata buffer
The patch titled
Subject: mm/sparsemem: pfn_to_page is not valid yet on SPARSEMEM
has been added to the -mm tree. Its filename is
mm-sparsemem-pfn_to_page-is-not-valid-yet-on-sparsemem.patch
This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/mm-sparsemem-pfn_to_page-is-not-va…
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/mm-sparsemem-pfn_to_page-is-not-va…
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next and is updated
there every 3-4 working days
------------------------------------------------------
From: Wei Yang <richardw.yang(a)linux.intel.com>
Subject: mm/sparsemem: pfn_to_page is not valid yet on SPARSEMEM
When we use SPARSEMEM instead of SPARSEMEM_VMEMMAP, pfn_to_page()
doesn't work before sparse_init_one_section() is called. This leads to a
crash when hotplug memory:
[ 41.839170] BUG: unable to handle page fault for address: 0000000006400000
[ 41.840663] #PF: supervisor write access in kernel mode
[ 41.841822] #PF: error_code(0x0002) - not-present page
[ 41.842970] PGD 0 P4D 0
[ 41.843538] Oops: 0002 [#1] SMP PTI
[ 41.844125] CPU: 3 PID: 221 Comm: kworker/u16:1 Tainted: G W 5.5.0-next-20200205+ #343
[ 41.845659] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 0.0.0 02/06/2015
[ 41.846977] Workqueue: kacpi_hotplug acpi_hotplug_work_fn
[ 41.847904] RIP: 0010:__memset+0x24/0x30
[ 41.848660] Code: cc cc cc cc cc cc 0f 1f 44 00 00 49 89 f9 48 89 d1 83 e2 07 48 c1 e9 03 40 0f b6 f6 48 b8 01 01 01 01 01 01 01 01 48 0f af c6 <f3> 48 ab 89 d1 f3 aa 4c 89 c8 c3 90 49 89 f9 40 88 f0 48 89 d1 f3
[ 41.851836] RSP: 0018:ffffb43ac0373c80 EFLAGS: 00010a87
[ 41.852686] RAX: ffffffffffffffff RBX: ffff8a1518800000 RCX: 0000000000050000
[ 41.853824] RDX: 0000000000000000 RSI: 00000000000000ff RDI: 0000000006400000
[ 41.854967] RBP: 0000000000140000 R08: 0000000000100000 R09: 0000000006400000
[ 41.856107] R10: 0000000000000000 R11: 0000000000000002 R12: 0000000000000000
[ 41.857255] R13: 0000000000000028 R14: 0000000000000000 R15: ffff8a153ffd9280
[ 41.858414] FS: 0000000000000000(0000) GS:ffff8a153ab00000(0000) knlGS:0000000000000000
[ 41.859703] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 41.860627] CR2: 0000000006400000 CR3: 0000000136fca000 CR4: 00000000000006e0
[ 41.861716] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 41.862680] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[ 41.863628] Call Trace:
[ 41.863983] sparse_add_section+0x1c9/0x26a
[ 41.864570] __add_pages+0xbf/0x150
[ 41.865057] add_pages+0x12/0x60
[ 41.865489] add_memory_resource+0xc8/0x210
[ 41.866017] ? wake_up_q+0xa0/0xa0
[ 41.866416] __add_memory+0x62/0xb0
[ 41.866825] acpi_memory_device_add+0x13f/0x300
[ 41.867410] acpi_bus_attach+0xf6/0x200
[ 41.867890] acpi_bus_scan+0x43/0x90
[ 41.868448] acpi_device_hotplug+0x275/0x3d0
[ 41.868972] acpi_hotplug_work_fn+0x1a/0x30
[ 41.869473] process_one_work+0x1a7/0x370
[ 41.869953] worker_thread+0x30/0x380
[ 41.870396] ? flush_rcu_work+0x30/0x30
[ 41.870846] kthread+0x112/0x130
[ 41.871236] ? kthread_create_on_node+0x60/0x60
[ 41.871770] ret_from_fork+0x35/0x40
We should use memmap as it did.
On x86 the impact is limited to x86_32 builds, or x86_64 configurations
that override the default setting for SPARSEMEM_VMEMMAP.
[dan.j.williams(a)intel.com: changelog update]
Link: http://lkml.kernel.org/r/20200219030454.4844-1-bhe@redhat.com
Fixes: ba72b4c8cf60 ("mm/sparsemem: support sub-section hotplug")
Signed-off-by: Wei Yang <richardw.yang(a)linux.intel.com>
Signed-off-by: Baoquan He <bhe(a)redhat.com>
Acked-by: David Hildenbrand <david(a)redhat.com>
Reviewed-by: Baoquan He <bhe(a)redhat.com>
Reviewed-by: Dan Williams <dan.j.williams(a)intel.com>
Cc: Mike Rapoport <rppt(a)linux.ibm.com>
Cc: Oscar Salvador <osalvador(a)suse.de>
Cc: Michal Hocko <mhocko(a)suse.com>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
mm/sparse.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/mm/sparse.c~mm-sparsemem-pfn_to_page-is-not-valid-yet-on-sparsemem
+++ a/mm/sparse.c
@@ -876,7 +876,7 @@ int __meminit sparse_add_section(int nid
* Poison uninitialized struct pages in order to catch invalid flags
* combinations.
*/
- page_init_poison(pfn_to_page(start_pfn), sizeof(struct page) * nr_pages);
+ page_init_poison(memmap, sizeof(struct page) * nr_pages);
ms = __nr_to_section(section_nr);
set_section_nid(section_nr, nid);
_
Patches currently in -mm which might be from richardw.yang(a)linux.intel.com are
mm-sparsemem-pfn_to_page-is-not-valid-yet-on-sparsemem.patch
mm-sparsemem-get-address-to-page-struct-instead-of-address-to-pfn.patch
mm-migratec-no-need-to-check-for-i-start-in-do_pages_move.patch
mm-migratec-wrap-do_move_pages_to_node-and-store_status.patch
mm-migratec-check-pagelist-in-move_pages_and_store_status.patch
mm-migratec-unify-not-queued-for-migration-handling-in-do_pages_move.patch