]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
Fixes for 5.4
authorSasha Levin <sashal@kernel.org>
Thu, 25 Mar 2021 20:14:41 +0000 (16:14 -0400)
committerSasha Levin <sashal@kernel.org>
Thu, 25 Mar 2021 20:15:30 +0000 (16:15 -0400)
Signed-off-by: Sasha Levin <sashal@kernel.org>
38 files changed:
queue-5.4/alsa-hda-ignore-invalid-nhlt-table.patch [new file with mode: 0644]
queue-5.4/atm-eni-dont-release-is-never-initialized.patch [new file with mode: 0644]
queue-5.4/atm-idt77252-fix-null-ptr-dereference.patch [new file with mode: 0644]
queue-5.4/atm-lanai-dont-run-lanai_dev_close-if-not-open.patch [new file with mode: 0644]
queue-5.4/atm-upd98402-fix-incorrect-allocation.patch [new file with mode: 0644]
queue-5.4/block-suppress-uevent-for-hidden-device-when-removed.patch [new file with mode: 0644]
queue-5.4/cifs-ask-for-more-credit-on-async-read-write-code-pa.patch [new file with mode: 0644]
queue-5.4/cifs-change-noisy-error-message-to-fyi.patch [new file with mode: 0644]
queue-5.4/cpufreq-blacklist-arm-vexpress-platforms-in-cpufreq-.patch [new file with mode: 0644]
queue-5.4/drm-amd-display-revert-dram_clock_change_latency-for.patch [new file with mode: 0644]
queue-5.4/drm-amdgpu-fb-bo-should-be-ttm_bo_type_device.patch [new file with mode: 0644]
queue-5.4/drm-radeon-fix-agp-dependency.patch [new file with mode: 0644]
queue-5.4/gianfar-fix-jumbo-packets-napi-rx-overrun-crash.patch [new file with mode: 0644]
queue-5.4/gpiolib-acpi-add-missing-irqf_oneshot.patch [new file with mode: 0644]
queue-5.4/habanalabs-call-put_pid-when-releasing-control-devic.patch [new file with mode: 0644]
queue-5.4/ia64-fix-ia64_syscall_get_set_arguments-for-break-ba.patch [new file with mode: 0644]
queue-5.4/ia64-fix-ptrace-ptrace_syscall_info_exit-sign.patch [new file with mode: 0644]
queue-5.4/irqchip-ingenic-add-support-for-the-jz4760.patch [new file with mode: 0644]
queue-5.4/ixgbe-fix-memleak-in-ixgbe_configure_clsu32.patch [new file with mode: 0644]
queue-5.4/net-davicom-use-platform_get_irq_optional.patch [new file with mode: 0644]
queue-5.4/net-fec-ptp-avoid-register-access-when-ipg-clock-is-.patch [new file with mode: 0644]
queue-5.4/net-hisilicon-hns-fix-error-return-code-of-hns_nic_c.patch [new file with mode: 0644]
queue-5.4/net-intel-iavf-fix-error-return-code-of-iavf_init_ge.patch [new file with mode: 0644]
queue-5.4/net-tehuti-fix-error-return-code-in-bdx_probe.patch [new file with mode: 0644]
queue-5.4/net-wan-fix-error-return-code-of-uhdlc_init.patch [new file with mode: 0644]
queue-5.4/nfs-correct-size-calculation-for-create-reply-length.patch [new file with mode: 0644]
queue-5.4/nfs-fix-pnfs_flexfile_layout-kconfig-default.patch [new file with mode: 0644]
queue-5.4/nfs-we-don-t-support-removing-system.nfs4_acl.patch [new file with mode: 0644]
queue-5.4/nvme-add-nvme_req_cancelled-flag-in-nvme_cancel_requ.patch [new file with mode: 0644]
queue-5.4/nvme-fc-return-nvme_sc_host_aborted_cmd-when-a-comma.patch [new file with mode: 0644]
queue-5.4/nvme-pci-add-the-disable_write_zeroes-quirk-for-a-sa.patch [new file with mode: 0644]
queue-5.4/powerpc-4xx-fix-build-errors-from-mfdcr.patch [new file with mode: 0644]
queue-5.4/regulator-qcom-rpmh-correct-the-pmic5_hfsmps515-buck.patch [new file with mode: 0644]
queue-5.4/revert-r8152-adjust-the-settings-about-mac-clock-spe.patch [new file with mode: 0644]
queue-5.4/series
queue-5.4/sparc64-fix-opcode-filtering-in-handling-of-no-fault.patch [new file with mode: 0644]
queue-5.4/sun-niu-fix-wrong-rxmac_bc_frm_cnt_count-count.patch [new file with mode: 0644]
queue-5.4/u64_stats-lockdep-fix-u64_stats_init-vs-lockdep.patch [new file with mode: 0644]

diff --git a/queue-5.4/alsa-hda-ignore-invalid-nhlt-table.patch b/queue-5.4/alsa-hda-ignore-invalid-nhlt-table.patch
new file mode 100644 (file)
index 0000000..b19f0c9
--- /dev/null
@@ -0,0 +1,50 @@
+From 3825b3ee3203e729170796515c8aa26f548f18b0 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 2 Mar 2021 09:10:03 -0500
+Subject: ALSA: hda: ignore invalid NHLT table
+
+From: Mark Pearson <markpearson@lenovo.com>
+
+[ Upstream commit a14a6219996ee6f6e858d83b11affc7907633687 ]
+
+On some Lenovo systems if the microphone is disabled in the BIOS
+only the NHLT table header is created, with no data. This means
+the endpoints field is not correctly set to zero - leading to an
+unintialised variable and hence invalid descriptors are parsed
+leading to page faults.
+
+The Lenovo firmware team is addressing this, but adding a check
+preventing invalid tables being parsed is worthwhile.
+
+Tested on a Lenovo T14.
+
+Tested-by: Philipp Leskovitz <philipp.leskovitz@secunet.com>
+Reported-by: Philipp Leskovitz <philipp.leskovitz@secunet.com>
+Signed-off-by: Mark Pearson <markpearson@lenovo.com>
+Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
+Link: https://lore.kernel.org/r/20210302141003.7342-1-markpearson@lenovo.com
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ sound/hda/intel-nhlt.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/sound/hda/intel-nhlt.c b/sound/hda/intel-nhlt.c
+index baeda6c9716a..6ed80a4cba01 100644
+--- a/sound/hda/intel-nhlt.c
++++ b/sound/hda/intel-nhlt.c
+@@ -72,6 +72,11 @@ int intel_nhlt_get_dmic_geo(struct device *dev, struct nhlt_acpi_table *nhlt)
+       if (!nhlt)
+               return 0;
++      if (nhlt->header.length <= sizeof(struct acpi_table_header)) {
++              dev_warn(dev, "Invalid DMIC description table\n");
++              return 0;
++      }
++
+       for (j = 0, epnt = nhlt->desc; j < nhlt->endpoint_count; j++,
+            epnt = (struct nhlt_endpoint *)((u8 *)epnt + epnt->length)) {
+-- 
+2.30.1
+
diff --git a/queue-5.4/atm-eni-dont-release-is-never-initialized.patch b/queue-5.4/atm-eni-dont-release-is-never-initialized.patch
new file mode 100644 (file)
index 0000000..67e311f
--- /dev/null
@@ -0,0 +1,106 @@
+From 830a52fc98b0c4a11d3e8737583aa5e6696667dc Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Sat, 27 Feb 2021 16:15:06 -0500
+Subject: atm: eni: dont release is never initialized
+
+From: Tong Zhang <ztong0001@gmail.com>
+
+[ Upstream commit 4deb550bc3b698a1f03d0332cde3df154d1b6c1e ]
+
+label err_eni_release is reachable when eni_start() fail.
+In eni_start() it calls dev->phy->start() in the last step, if start()
+fail we don't need to call phy->stop(), if start() is never called, we
+neither need to call phy->stop(), otherwise null-ptr-deref will happen.
+
+In order to fix this issue, don't call phy->stop() in label err_eni_release
+
+[    4.875714] ==================================================================
+[    4.876091] BUG: KASAN: null-ptr-deref in suni_stop+0x47/0x100 [suni]
+[    4.876433] Read of size 8 at addr 0000000000000030 by task modprobe/95
+[    4.876778]
+[    4.876862] CPU: 0 PID: 95 Comm: modprobe Not tainted 5.11.0-rc7-00090-gdcc0b49040c7 #2
+[    4.877290] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.13.0-48-gd94
+[    4.877876] Call Trace:
+[    4.878009]  dump_stack+0x7d/0xa3
+[    4.878191]  kasan_report.cold+0x10c/0x10e
+[    4.878410]  ? __slab_free+0x2f0/0x340
+[    4.878612]  ? suni_stop+0x47/0x100 [suni]
+[    4.878832]  suni_stop+0x47/0x100 [suni]
+[    4.879043]  eni_do_release+0x3b/0x70 [eni]
+[    4.879269]  eni_init_one.cold+0x1152/0x1747 [eni]
+[    4.879528]  ? _raw_spin_lock_irqsave+0x7b/0xd0
+[    4.879768]  ? eni_ioctl+0x270/0x270 [eni]
+[    4.879990]  ? __mutex_lock_slowpath+0x10/0x10
+[    4.880226]  ? eni_ioctl+0x270/0x270 [eni]
+[    4.880448]  local_pci_probe+0x6f/0xb0
+[    4.880650]  pci_device_probe+0x171/0x240
+[    4.880864]  ? pci_device_remove+0xe0/0xe0
+[    4.881086]  ? kernfs_create_link+0xb6/0x110
+[    4.881315]  ? sysfs_do_create_link_sd.isra.0+0x76/0xe0
+[    4.881594]  really_probe+0x161/0x420
+[    4.881791]  driver_probe_device+0x6d/0xd0
+[    4.882010]  device_driver_attach+0x82/0x90
+[    4.882233]  ? device_driver_attach+0x90/0x90
+[    4.882465]  __driver_attach+0x60/0x100
+[    4.882671]  ? device_driver_attach+0x90/0x90
+[    4.882903]  bus_for_each_dev+0xe1/0x140
+[    4.883114]  ? subsys_dev_iter_exit+0x10/0x10
+[    4.883346]  ? klist_node_init+0x61/0x80
+[    4.883557]  bus_add_driver+0x254/0x2a0
+[    4.883764]  driver_register+0xd3/0x150
+[    4.883971]  ? 0xffffffffc0038000
+[    4.884149]  do_one_initcall+0x84/0x250
+[    4.884355]  ? trace_event_raw_event_initcall_finish+0x150/0x150
+[    4.884674]  ? unpoison_range+0xf/0x30
+[    4.884875]  ? ____kasan_kmalloc.constprop.0+0x84/0xa0
+[    4.885150]  ? unpoison_range+0xf/0x30
+[    4.885352]  ? unpoison_range+0xf/0x30
+[    4.885557]  do_init_module+0xf8/0x350
+[    4.885760]  load_module+0x3fe6/0x4340
+[    4.885960]  ? vm_unmap_ram+0x1d0/0x1d0
+[    4.886166]  ? ____kasan_kmalloc.constprop.0+0x84/0xa0
+[    4.886441]  ? module_frob_arch_sections+0x20/0x20
+[    4.886697]  ? __do_sys_finit_module+0x108/0x170
+[    4.886941]  __do_sys_finit_module+0x108/0x170
+[    4.887178]  ? __ia32_sys_init_module+0x40/0x40
+[    4.887419]  ? file_open_root+0x200/0x200
+[    4.887634]  ? do_sys_open+0x85/0xe0
+[    4.887826]  ? filp_open+0x50/0x50
+[    4.888009]  ? fpregs_assert_state_consistent+0x4d/0x60
+[    4.888287]  ? exit_to_user_mode_prepare+0x2f/0x130
+[    4.888547]  do_syscall_64+0x33/0x40
+[    4.888739]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
+[    4.889010] RIP: 0033:0x7ff62fcf1cf7
+[    4.889202] Code: 48 89 57 30 48 8b 04 24 48 89 47 38 e9 1d a0 02 00 48 89 f8 48 89 f71
+[    4.890172] RSP: 002b:00007ffe6644ade8 EFLAGS: 00000246 ORIG_RAX: 0000000000000139
+[    4.890570] RAX: ffffffffffffffda RBX: 0000000000f2ca70 RCX: 00007ff62fcf1cf7
+[    4.890944] RDX: 0000000000000000 RSI: 0000000000f2b9e0 RDI: 0000000000000003
+[    4.891318] RBP: 0000000000000003 R08: 0000000000000000 R09: 0000000000000001
+[    4.891691] R10: 00007ff62fd55300 R11: 0000000000000246 R12: 0000000000f2b9e0
+[    4.892064] R13: 0000000000000000 R14: 0000000000f2bdd0 R15: 0000000000000001
+[    4.892439] ==================================================================
+
+Signed-off-by: Tong Zhang <ztong0001@gmail.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/atm/eni.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/atm/eni.c b/drivers/atm/eni.c
+index bedaebd5a495..de52428b8833 100644
+--- a/drivers/atm/eni.c
++++ b/drivers/atm/eni.c
+@@ -2281,7 +2281,8 @@ static int eni_init_one(struct pci_dev *pci_dev,
+       return rc;
+ err_eni_release:
+-      eni_do_release(dev);
++      dev->phy = NULL;
++      iounmap(ENI_DEV(dev)->ioaddr);
+ err_unregister:
+       atm_dev_deregister(dev);
+ err_free_consistent:
+-- 
+2.30.1
+
diff --git a/queue-5.4/atm-idt77252-fix-null-ptr-dereference.patch b/queue-5.4/atm-idt77252-fix-null-ptr-dereference.patch
new file mode 100644 (file)
index 0000000..c9797bf
--- /dev/null
@@ -0,0 +1,48 @@
+From 043e4b985411c297e2d99c9391942bb69f444de5 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Sun, 7 Mar 2021 22:25:30 -0500
+Subject: atm: idt77252: fix null-ptr-dereference
+
+From: Tong Zhang <ztong0001@gmail.com>
+
+[ Upstream commit 4416e98594dc04590ebc498fc4e530009535c511 ]
+
+this one is similar to the phy_data allocation fix in uPD98402, the
+driver allocate the idt77105_priv and store to dev_data but later
+dereference using dev->dev_data, which will cause null-ptr-dereference.
+
+fix this issue by changing dev_data to phy_data so that PRIV(dev) can
+work correctly.
+
+Signed-off-by: Tong Zhang <ztong0001@gmail.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/atm/idt77105.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/atm/idt77105.c b/drivers/atm/idt77105.c
+index 63871859e6e8..52c2878b755d 100644
+--- a/drivers/atm/idt77105.c
++++ b/drivers/atm/idt77105.c
+@@ -262,7 +262,7 @@ static int idt77105_start(struct atm_dev *dev)
+ {
+       unsigned long flags;
+-      if (!(dev->dev_data = kmalloc(sizeof(struct idt77105_priv),GFP_KERNEL)))
++      if (!(dev->phy_data = kmalloc(sizeof(struct idt77105_priv),GFP_KERNEL)))
+               return -ENOMEM;
+       PRIV(dev)->dev = dev;
+       spin_lock_irqsave(&idt77105_priv_lock, flags);
+@@ -337,7 +337,7 @@ static int idt77105_stop(struct atm_dev *dev)
+                 else
+                     idt77105_all = walk->next;
+               dev->phy = NULL;
+-                dev->dev_data = NULL;
++                dev->phy_data = NULL;
+                 kfree(walk);
+                 break;
+             }
+-- 
+2.30.1
+
diff --git a/queue-5.4/atm-lanai-dont-run-lanai_dev_close-if-not-open.patch b/queue-5.4/atm-lanai-dont-run-lanai_dev_close-if-not-open.patch
new file mode 100644 (file)
index 0000000..e5c8307
--- /dev/null
@@ -0,0 +1,147 @@
+From dc6c2ea81b0ee5cf12ef0ead626cdb0509bd942a Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Sat, 27 Feb 2021 22:55:50 -0500
+Subject: atm: lanai: dont run lanai_dev_close if not open
+
+From: Tong Zhang <ztong0001@gmail.com>
+
+[ Upstream commit a2bd45834e83d6c5a04d397bde13d744a4812dfc ]
+
+lanai_dev_open() can fail. When it fail, lanai->base is unmapped and the
+pci device is disabled. The caller, lanai_init_one(), then tries to run
+atm_dev_deregister(). This will subsequently call lanai_dev_close() and
+use the already released MMIO area.
+
+To fix this issue, set the lanai->base to NULL if open fail,
+and test the flag in lanai_dev_close().
+
+[    8.324153] lanai: lanai_start() failed, err=19
+[    8.324819] lanai(itf 0): shutting down interface
+[    8.325211] BUG: unable to handle page fault for address: ffffc90000180024
+[    8.325781] #PF: supervisor write access in kernel mode
+[    8.326215] #PF: error_code(0x0002) - not-present page
+[    8.326641] PGD 100000067 P4D 100000067 PUD 100139067 PMD 10013a067 PTE 0
+[    8.327206] Oops: 0002 [#1] SMP KASAN NOPTI
+[    8.327557] CPU: 0 PID: 95 Comm: modprobe Not tainted 5.11.0-rc7-00090-gdcc0b49040c7 #12
+[    8.328229] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.13.0-48-gd9c812dda519-4
+[    8.329145] RIP: 0010:lanai_dev_close+0x4f/0xe5 [lanai]
+[    8.329587] Code: 00 48 c7 c7 00 d3 01 c0 e8 49 4e 0a c2 48 8d bd 08 02 00 00 e8 6e 52 14 c1 48 80
+[    8.330917] RSP: 0018:ffff8881029ef680 EFLAGS: 00010246
+[    8.331196] RAX: 000000000003fffe RBX: ffff888102fb4800 RCX: ffffffffc001a98a
+[    8.331572] RDX: ffffc90000180000 RSI: 0000000000000246 RDI: ffff888102fb4000
+[    8.331948] RBP: ffff888102fb4000 R08: ffffffff8115da8a R09: ffffed102053deaa
+[    8.332326] R10: 0000000000000003 R11: ffffed102053dea9 R12: ffff888102fb48a4
+[    8.332701] R13: ffffffffc00123c0 R14: ffff888102fb4b90 R15: ffff888102fb4b88
+[    8.333077] FS:  00007f08eb9056a0(0000) GS:ffff88815b400000(0000) knlGS:0000000000000000
+[    8.333502] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
+[    8.333806] CR2: ffffc90000180024 CR3: 0000000102a28000 CR4: 00000000000006f0
+[    8.334182] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
+[    8.334557] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
+[    8.334932] Call Trace:
+[    8.335066]  atm_dev_deregister+0x161/0x1a0 [atm]
+[    8.335324]  lanai_init_one.cold+0x20c/0x96d [lanai]
+[    8.335594]  ? lanai_send+0x2a0/0x2a0 [lanai]
+[    8.335831]  local_pci_probe+0x6f/0xb0
+[    8.336039]  pci_device_probe+0x171/0x240
+[    8.336255]  ? pci_device_remove+0xe0/0xe0
+[    8.336475]  ? kernfs_create_link+0xb6/0x110
+[    8.336704]  ? sysfs_do_create_link_sd.isra.0+0x76/0xe0
+[    8.336983]  really_probe+0x161/0x420
+[    8.337181]  driver_probe_device+0x6d/0xd0
+[    8.337401]  device_driver_attach+0x82/0x90
+[    8.337626]  ? device_driver_attach+0x90/0x90
+[    8.337859]  __driver_attach+0x60/0x100
+[    8.338065]  ? device_driver_attach+0x90/0x90
+[    8.338298]  bus_for_each_dev+0xe1/0x140
+[    8.338511]  ? subsys_dev_iter_exit+0x10/0x10
+[    8.338745]  ? klist_node_init+0x61/0x80
+[    8.338956]  bus_add_driver+0x254/0x2a0
+[    8.339164]  driver_register+0xd3/0x150
+[    8.339370]  ? 0xffffffffc0028000
+[    8.339550]  do_one_initcall+0x84/0x250
+[    8.339755]  ? trace_event_raw_event_initcall_finish+0x150/0x150
+[    8.340076]  ? free_vmap_area_noflush+0x1a5/0x5c0
+[    8.340329]  ? unpoison_range+0xf/0x30
+[    8.340532]  ? ____kasan_kmalloc.constprop.0+0x84/0xa0
+[    8.340806]  ? unpoison_range+0xf/0x30
+[    8.341014]  ? unpoison_range+0xf/0x30
+[    8.341217]  do_init_module+0xf8/0x350
+[    8.341419]  load_module+0x3fe6/0x4340
+[    8.341621]  ? vm_unmap_ram+0x1d0/0x1d0
+[    8.341826]  ? ____kasan_kmalloc.constprop.0+0x84/0xa0
+[    8.342101]  ? module_frob_arch_sections+0x20/0x20
+[    8.342358]  ? __do_sys_finit_module+0x108/0x170
+[    8.342604]  __do_sys_finit_module+0x108/0x170
+[    8.342841]  ? __ia32_sys_init_module+0x40/0x40
+[    8.343083]  ? file_open_root+0x200/0x200
+[    8.343298]  ? do_sys_open+0x85/0xe0
+[    8.343491]  ? filp_open+0x50/0x50
+[    8.343675]  ? exit_to_user_mode_prepare+0xfc/0x130
+[    8.343935]  do_syscall_64+0x33/0x40
+[    8.344132]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
+[    8.344401] RIP: 0033:0x7f08eb887cf7
+[    8.344594] Code: 48 89 57 30 48 8b 04 24 48 89 47 38 e9 1d a0 02 00 48 89 f8 48 89 f7 48 89 d6 41
+[    8.345565] RSP: 002b:00007ffcd5c98ad8 EFLAGS: 00000246 ORIG_RAX: 0000000000000139
+[    8.345962] RAX: ffffffffffffffda RBX: 00000000008fea70 RCX: 00007f08eb887cf7
+[    8.346336] RDX: 0000000000000000 RSI: 00000000008fd9e0 RDI: 0000000000000003
+[    8.346711] RBP: 0000000000000003 R08: 0000000000000000 R09: 0000000000000001
+[    8.347085] R10: 00007f08eb8eb300 R11: 0000000000000246 R12: 00000000008fd9e0
+[    8.347460] R13: 0000000000000000 R14: 00000000008fddd0 R15: 0000000000000001
+[    8.347836] Modules linked in: lanai(+) atm
+[    8.348065] CR2: ffffc90000180024
+[    8.348244] ---[ end trace 7fdc1c668f2003e5 ]---
+[    8.348490] RIP: 0010:lanai_dev_close+0x4f/0xe5 [lanai]
+[    8.348772] Code: 00 48 c7 c7 00 d3 01 c0 e8 49 4e 0a c2 48 8d bd 08 02 00 00 e8 6e 52 14 c1 48 80
+[    8.349745] RSP: 0018:ffff8881029ef680 EFLAGS: 00010246
+[    8.350022] RAX: 000000000003fffe RBX: ffff888102fb4800 RCX: ffffffffc001a98a
+[    8.350397] RDX: ffffc90000180000 RSI: 0000000000000246 RDI: ffff888102fb4000
+[    8.350772] RBP: ffff888102fb4000 R08: ffffffff8115da8a R09: ffffed102053deaa
+[    8.351151] R10: 0000000000000003 R11: ffffed102053dea9 R12: ffff888102fb48a4
+[    8.351525] R13: ffffffffc00123c0 R14: ffff888102fb4b90 R15: ffff888102fb4b88
+[    8.351918] FS:  00007f08eb9056a0(0000) GS:ffff88815b400000(0000) knlGS:0000000000000000
+[    8.352343] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
+[    8.352647] CR2: ffffc90000180024 CR3: 0000000102a28000 CR4: 00000000000006f0
+[    8.353022] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
+[    8.353397] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
+[    8.353958] modprobe (95) used greatest stack depth: 26216 bytes left
+
+Signed-off-by: Tong Zhang <ztong0001@gmail.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/atm/lanai.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/atm/lanai.c b/drivers/atm/lanai.c
+index 645a6bc1df88..c6b38112bcf4 100644
+--- a/drivers/atm/lanai.c
++++ b/drivers/atm/lanai.c
+@@ -2234,6 +2234,7 @@ static int lanai_dev_open(struct atm_dev *atmdev)
+       conf1_write(lanai);
+ #endif
+       iounmap(lanai->base);
++      lanai->base = NULL;
+     error_pci:
+       pci_disable_device(lanai->pci);
+     error:
+@@ -2246,6 +2247,8 @@ static int lanai_dev_open(struct atm_dev *atmdev)
+ static void lanai_dev_close(struct atm_dev *atmdev)
+ {
+       struct lanai_dev *lanai = (struct lanai_dev *) atmdev->dev_data;
++      if (lanai->base==NULL)
++              return;
+       printk(KERN_INFO DEV_LABEL "(itf %d): shutting down interface\n",
+           lanai->number);
+       lanai_timed_poll_stop(lanai);
+@@ -2555,7 +2558,7 @@ static int lanai_init_one(struct pci_dev *pci,
+       struct atm_dev *atmdev;
+       int result;
+-      lanai = kmalloc(sizeof(*lanai), GFP_KERNEL);
++      lanai = kzalloc(sizeof(*lanai), GFP_KERNEL);
+       if (lanai == NULL) {
+               printk(KERN_ERR DEV_LABEL
+                      ": couldn't allocate dev_data structure!\n");
+-- 
+2.30.1
+
diff --git a/queue-5.4/atm-upd98402-fix-incorrect-allocation.patch b/queue-5.4/atm-upd98402-fix-incorrect-allocation.patch
new file mode 100644 (file)
index 0000000..f271149
--- /dev/null
@@ -0,0 +1,39 @@
+From 200bb7e9f2f204b5f315f39861269f20ce3b5125 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Sun, 7 Mar 2021 22:25:29 -0500
+Subject: atm: uPD98402: fix incorrect allocation
+
+From: Tong Zhang <ztong0001@gmail.com>
+
+[ Upstream commit 3153724fc084d8ef640c611f269ddfb576d1dcb1 ]
+
+dev->dev_data is set in zatm.c, calling zatm_start() will overwrite this
+dev->dev_data in uPD98402_start() and a subsequent PRIV(dev)->lock
+(i.e dev->phy_data->lock) will result in a null-ptr-dereference.
+
+I believe this is a typo and what it actually want to do is to allocate
+phy_data instead of dev_data.
+
+Signed-off-by: Tong Zhang <ztong0001@gmail.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/atm/uPD98402.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/atm/uPD98402.c b/drivers/atm/uPD98402.c
+index 7850758b5bb8..239852d85558 100644
+--- a/drivers/atm/uPD98402.c
++++ b/drivers/atm/uPD98402.c
+@@ -211,7 +211,7 @@ static void uPD98402_int(struct atm_dev *dev)
+ static int uPD98402_start(struct atm_dev *dev)
+ {
+       DPRINTK("phy_start\n");
+-      if (!(dev->dev_data = kmalloc(sizeof(struct uPD98402_priv),GFP_KERNEL)))
++      if (!(dev->phy_data = kmalloc(sizeof(struct uPD98402_priv),GFP_KERNEL)))
+               return -ENOMEM;
+       spin_lock_init(&PRIV(dev)->lock);
+       memset(&PRIV(dev)->sonet_stats,0,sizeof(struct k_sonet_stats));
+-- 
+2.30.1
+
diff --git a/queue-5.4/block-suppress-uevent-for-hidden-device-when-removed.patch b/queue-5.4/block-suppress-uevent-for-hidden-device-when-removed.patch
new file mode 100644 (file)
index 0000000..66c7aca
--- /dev/null
@@ -0,0 +1,50 @@
+From fdf806c9dfc806b93ddfe0f00e75d98effa05847 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 11 Mar 2021 16:19:17 +0100
+Subject: block: Suppress uevent for hidden device when removed
+
+From: Daniel Wagner <dwagner@suse.de>
+
+[ Upstream commit 9ec491447b90ad6a4056a9656b13f0b3a1e83043 ]
+
+register_disk() suppress uevents for devices with the GENHD_FL_HIDDEN
+but enables uevents at the end again in order to announce disk after
+possible partitions are created.
+
+When the device is removed the uevents are still on and user land sees
+'remove' messages for devices which were never 'add'ed to the system.
+
+  KERNEL[95481.571887] remove   /devices/virtual/nvme-fabrics/ctl/nvme5/nvme0c5n1 (block)
+
+Let's suppress the uevents for GENHD_FL_HIDDEN by not enabling the
+uevents at all.
+
+Signed-off-by: Daniel Wagner <dwagner@suse.de>
+Reviewed-by: Christoph Hellwig <hch@lst.de>
+Reviewed-by: Martin Wilck <mwilck@suse.com>
+Link: https://lore.kernel.org/r/20210311151917.136091-1-dwagner@suse.de
+Signed-off-by: Jens Axboe <axboe@kernel.dk>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ block/genhd.c | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/block/genhd.c b/block/genhd.c
+index 604f0a2cbc9a..2f6f341a8fbb 100644
+--- a/block/genhd.c
++++ b/block/genhd.c
+@@ -637,10 +637,8 @@ static void register_disk(struct device *parent, struct gendisk *disk,
+       disk->part0.holder_dir = kobject_create_and_add("holders", &ddev->kobj);
+       disk->slave_dir = kobject_create_and_add("slaves", &ddev->kobj);
+-      if (disk->flags & GENHD_FL_HIDDEN) {
+-              dev_set_uevent_suppress(ddev, 0);
++      if (disk->flags & GENHD_FL_HIDDEN)
+               return;
+-      }
+       /* No minors to use for partitions */
+       if (!disk_part_scan_enabled(disk))
+-- 
+2.30.1
+
diff --git a/queue-5.4/cifs-ask-for-more-credit-on-async-read-write-code-pa.patch b/queue-5.4/cifs-ask-for-more-credit-on-async-read-write-code-pa.patch
new file mode 100644 (file)
index 0000000..ce1bc4f
--- /dev/null
@@ -0,0 +1,54 @@
+From e47d70bc8b92da75ab6c79ef39a268d36722f20e Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 4 Mar 2021 17:51:48 +0000
+Subject: cifs: ask for more credit on async read/write code paths
+
+From: Aurelien Aptel <aaptel@suse.com>
+
+[ Upstream commit 88fd98a2306755b965e4f4567f84e73db3b6738c ]
+
+When doing a large read or write workload we only
+very gradually increase the number of credits
+which can cause problems with parallelizing large i/o
+(I/O ramps up more slowly than it should for large
+read/write workloads) especially with multichannel
+when the number of credits on the secondary channels
+starts out low (e.g. less than about 130) or when
+recovering after server throttled back the number
+of credit.
+
+Signed-off-by: Aurelien Aptel <aaptel@suse.com>
+Reviewed-by: Shyam Prasad N <sprasad@microsoft.com>
+Signed-off-by: Steve French <stfrench@microsoft.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ fs/cifs/smb2pdu.c | 6 ++----
+ 1 file changed, 2 insertions(+), 4 deletions(-)
+
+diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c
+index 7adecfd0c1e9..81d9c4ea0e8f 100644
+--- a/fs/cifs/smb2pdu.c
++++ b/fs/cifs/smb2pdu.c
+@@ -3743,8 +3743,7 @@ smb2_async_readv(struct cifs_readdata *rdata)
+       if (rdata->credits.value > 0) {
+               shdr->CreditCharge = cpu_to_le16(DIV_ROUND_UP(rdata->bytes,
+                                               SMB2_MAX_BUFFER_SIZE));
+-              shdr->CreditRequest =
+-                      cpu_to_le16(le16_to_cpu(shdr->CreditCharge) + 1);
++              shdr->CreditRequest = cpu_to_le16(le16_to_cpu(shdr->CreditCharge) + 8);
+               rc = adjust_credits(server, &rdata->credits, rdata->bytes);
+               if (rc)
+@@ -4038,8 +4037,7 @@ smb2_async_writev(struct cifs_writedata *wdata,
+       if (wdata->credits.value > 0) {
+               shdr->CreditCharge = cpu_to_le16(DIV_ROUND_UP(wdata->bytes,
+                                                   SMB2_MAX_BUFFER_SIZE));
+-              shdr->CreditRequest =
+-                      cpu_to_le16(le16_to_cpu(shdr->CreditCharge) + 1);
++              shdr->CreditRequest = cpu_to_le16(le16_to_cpu(shdr->CreditCharge) + 8);
+               rc = adjust_credits(server, &wdata->credits, wdata->bytes);
+               if (rc)
+-- 
+2.30.1
+
diff --git a/queue-5.4/cifs-change-noisy-error-message-to-fyi.patch b/queue-5.4/cifs-change-noisy-error-message-to-fyi.patch
new file mode 100644 (file)
index 0000000..7f5073c
--- /dev/null
@@ -0,0 +1,47 @@
+From e5c3e91b47373e2ceb9890fff891d3a2c7121399 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Mon, 8 Mar 2021 12:00:48 -0300
+Subject: cifs: change noisy error message to FYI
+
+From: Paulo Alcantara <pc@cjr.nz>
+
+[ Upstream commit e3d100eae44b42f309c1366efb8397368f1cf8ed ]
+
+A customer has reported that their dmesg were being flooded by
+
+  CIFS: VFS: \\server Cancelling wait for mid xxx cmd: a
+  CIFS: VFS: \\server Cancelling wait for mid yyy cmd: b
+  CIFS: VFS: \\server Cancelling wait for mid zzz cmd: c
+
+because some processes that were performing statfs(2) on the share had
+been interrupted due to their automount setup when certain users
+logged in and out.
+
+Change it to FYI as they should be mostly informative rather than
+error messages.
+
+Signed-off-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
+Reviewed-by: Aurelien Aptel <aaptel@suse.com>
+Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com>
+Signed-off-by: Steve French <stfrench@microsoft.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ fs/cifs/transport.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/fs/cifs/transport.c b/fs/cifs/transport.c
+index e99ecfafffac..61e7df4d9cb1 100644
+--- a/fs/cifs/transport.c
++++ b/fs/cifs/transport.c
+@@ -1148,7 +1148,7 @@ compound_send_recv(const unsigned int xid, struct cifs_ses *ses,
+       }
+       if (rc != 0) {
+               for (; i < num_rqst; i++) {
+-                      cifs_server_dbg(VFS, "Cancelling wait for mid %llu cmd: %d\n",
++                      cifs_server_dbg(FYI, "Cancelling wait for mid %llu cmd: %d\n",
+                                midQ[i]->mid, le16_to_cpu(midQ[i]->command));
+                       send_cancel(server, &rqst[i], midQ[i]);
+                       spin_lock(&GlobalMid_Lock);
+-- 
+2.30.1
+
diff --git a/queue-5.4/cpufreq-blacklist-arm-vexpress-platforms-in-cpufreq-.patch b/queue-5.4/cpufreq-blacklist-arm-vexpress-platforms-in-cpufreq-.patch
new file mode 100644 (file)
index 0000000..7d5f804
--- /dev/null
@@ -0,0 +1,36 @@
+From a97744b492eb263fe23236512ac65a61f8972b47 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 18 Feb 2021 22:23:26 +0000
+Subject: cpufreq: blacklist Arm Vexpress platforms in cpufreq-dt-platdev
+
+From: Sudeep Holla <sudeep.holla@arm.com>
+
+[ Upstream commit fbb31cb805fd3574d3be7defc06a7fd2fd9af7d2 ]
+
+Add "arm,vexpress" to cpufreq-dt-platdev blacklist since the actual
+scaling is handled by the firmware cpufreq drivers(scpi, scmi and
+vexpress-spc).
+
+Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
+Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/cpufreq/cpufreq-dt-platdev.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/drivers/cpufreq/cpufreq-dt-platdev.c b/drivers/cpufreq/cpufreq-dt-platdev.c
+index bca8d1f47fd2..1200842c3da4 100644
+--- a/drivers/cpufreq/cpufreq-dt-platdev.c
++++ b/drivers/cpufreq/cpufreq-dt-platdev.c
+@@ -103,6 +103,8 @@ static const struct of_device_id whitelist[] __initconst = {
+ static const struct of_device_id blacklist[] __initconst = {
+       { .compatible = "allwinner,sun50i-h6", },
++      { .compatible = "arm,vexpress", },
++
+       { .compatible = "calxeda,highbank", },
+       { .compatible = "calxeda,ecx-2000", },
+-- 
+2.30.1
+
diff --git a/queue-5.4/drm-amd-display-revert-dram_clock_change_latency-for.patch b/queue-5.4/drm-amd-display-revert-dram_clock_change_latency-for.patch
new file mode 100644 (file)
index 0000000..a4d5f4a
--- /dev/null
@@ -0,0 +1,39 @@
+From 72d6b7f526c06907d5d51face75b26ee3ea2ead5 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 26 Feb 2021 13:20:43 -0500
+Subject: drm/amd/display: Revert dram_clock_change_latency for DCN2.1
+
+From: Sung Lee <sung.lee@amd.com>
+
+[ Upstream commit b0075d114c33580f5c9fa9cee8e13d06db41471b ]
+
+[WHY & HOW]
+Using values provided by DF for latency may cause hangs in
+multi display configurations. Revert change to previous value.
+
+Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
+Signed-off-by: Sung Lee <sung.lee@amd.com>
+Reviewed-by: Haonan Wang <Haonan.Wang2@amd.com>
+Acked-by: Eryk Brol <eryk.brol@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c b/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c
+index f63cbbee7b33..11a4c4029a90 100644
+--- a/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c
++++ b/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c
+@@ -257,7 +257,7 @@ struct _vcs_dpi_soc_bounding_box_st dcn2_1_soc = {
+       .num_banks = 8,
+       .num_chans = 4,
+       .vmm_page_size_bytes = 4096,
+-      .dram_clock_change_latency_us = 11.72,
++      .dram_clock_change_latency_us = 23.84,
+       .return_bus_width_bytes = 64,
+       .dispclk_dppclk_vco_speed_mhz = 3600,
+       .xfc_bus_transport_time_us = 4,
+-- 
+2.30.1
+
diff --git a/queue-5.4/drm-amdgpu-fb-bo-should-be-ttm_bo_type_device.patch b/queue-5.4/drm-amdgpu-fb-bo-should-be-ttm_bo_type_device.patch
new file mode 100644 (file)
index 0000000..94330d3
--- /dev/null
@@ -0,0 +1,39 @@
+From 273d672d225ac2b2fa0c60a79ff01403d97f4927 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Mon, 8 Mar 2021 15:22:22 +0100
+Subject: drm/amdgpu: fb BO should be ttm_bo_type_device
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Nirmoy Das <nirmoy.das@amd.com>
+
+[ Upstream commit 521f04f9e3ffc73ef96c776035f8a0a31b4cdd81 ]
+
+FB BO should not be ttm_bo_type_kernel type and
+amdgpufb_create_pinned_object() pins the FB BO anyway.
+
+Signed-off-by: Nirmoy Das <nirmoy.das@amd.com>
+Acked-by: Christian König <christian.koenig@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c
+index eaa5e7b7c19d..fd94a17fb2c6 100644
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c
+@@ -146,7 +146,7 @@ static int amdgpufb_create_pinned_object(struct amdgpu_fbdev *rfbdev,
+       size = mode_cmd->pitches[0] * height;
+       aligned_size = ALIGN(size, PAGE_SIZE);
+       ret = amdgpu_gem_object_create(adev, aligned_size, 0, domain, flags,
+-                                     ttm_bo_type_kernel, NULL, &gobj);
++                                     ttm_bo_type_device, NULL, &gobj);
+       if (ret) {
+               pr_err("failed to allocate framebuffer (%d)\n", aligned_size);
+               return -ENOMEM;
+-- 
+2.30.1
+
diff --git a/queue-5.4/drm-radeon-fix-agp-dependency.patch b/queue-5.4/drm-radeon-fix-agp-dependency.patch
new file mode 100644 (file)
index 0000000..bc64a3e
--- /dev/null
@@ -0,0 +1,38 @@
+From c22632ef6ea5fc6746fb806aae64bcb112455ef0 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Mon, 8 Mar 2021 19:22:13 +0100
+Subject: drm/radeon: fix AGP dependency
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Christian König <christian.koenig@amd.com>
+
+[ Upstream commit cba2afb65cb05c3d197d17323fee4e3c9edef9cd ]
+
+When AGP is compiled as module radeon must be compiled as module as
+well.
+
+Signed-off-by: Christian König <christian.koenig@amd.com>
+Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/gpu/drm/Kconfig | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
+index e67c194c2aca..649f17dfcf45 100644
+--- a/drivers/gpu/drm/Kconfig
++++ b/drivers/gpu/drm/Kconfig
+@@ -206,6 +206,7 @@ source "drivers/gpu/drm/arm/Kconfig"
+ config DRM_RADEON
+       tristate "ATI Radeon"
+       depends on DRM && PCI && MMU
++      depends on AGP || !AGP
+       select FW_LOADER
+         select DRM_KMS_HELPER
+         select DRM_TTM
+-- 
+2.30.1
+
diff --git a/queue-5.4/gianfar-fix-jumbo-packets-napi-rx-overrun-crash.patch b/queue-5.4/gianfar-fix-jumbo-packets-napi-rx-overrun-crash.patch
new file mode 100644 (file)
index 0000000..5200c7d
--- /dev/null
@@ -0,0 +1,101 @@
+From cd42996e46325dce9c07f54fc841a8317e9d49bb Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 4 Mar 2021 20:52:52 +0100
+Subject: gianfar: fix jumbo packets+napi+rx overrun crash
+
+From: Michael Braun <michael-dev@fami-braun.de>
+
+[ Upstream commit d8861bab48b6c1fc3cdbcab8ff9d1eaea43afe7f ]
+
+When using jumbo packets and overrunning rx queue with napi enabled,
+the following sequence is observed in gfar_add_rx_frag:
+
+   | lstatus                              |       | skb                   |
+t  | lstatus,  size, flags                | first | len, data_len, *ptr   |
+---+--------------------------------------+-------+-----------------------+
+13 | 18002348, 9032, INTERRUPT LAST       | 0     | 9600, 8000,  f554c12e |
+12 | 10000640, 1600, INTERRUPT            | 0     | 8000, 6400,  f554c12e |
+11 | 10000640, 1600, INTERRUPT            | 0     | 6400, 4800,  f554c12e |
+10 | 10000640, 1600, INTERRUPT            | 0     | 4800, 3200,  f554c12e |
+09 | 10000640, 1600, INTERRUPT            | 0     | 3200, 1600,  f554c12e |
+08 | 14000640, 1600, INTERRUPT FIRST      | 0     | 1600, 0,     f554c12e |
+07 | 14000640, 1600, INTERRUPT FIRST      | 1     | 0,    0,     f554c12e |
+06 | 1c000080, 128,  INTERRUPT LAST FIRST | 1     | 0,    0,     abf3bd6e |
+05 | 18002348, 9032, INTERRUPT LAST       | 0     | 8000, 6400,  c5a57780 |
+04 | 10000640, 1600, INTERRUPT            | 0     | 6400, 4800,  c5a57780 |
+03 | 10000640, 1600, INTERRUPT            | 0     | 4800, 3200,  c5a57780 |
+02 | 10000640, 1600, INTERRUPT            | 0     | 3200, 1600,  c5a57780 |
+01 | 10000640, 1600, INTERRUPT            | 0     | 1600, 0,     c5a57780 |
+00 | 14000640, 1600, INTERRUPT FIRST      | 1     | 0,    0,     c5a57780 |
+
+So at t=7 a new packets is started but not finished, probably due to rx
+overrun - but rx overrun is not indicated in the flags. Instead a new
+packets starts at t=8. This results in skb->len to exceed size for the LAST
+fragment at t=13 and thus a negative fragment size added to the skb.
+
+This then crashes:
+
+kernel BUG at include/linux/skbuff.h:2277!
+Oops: Exception in kernel mode, sig: 5 [#1]
+...
+NIP [c04689f4] skb_pull+0x2c/0x48
+LR [c03f62ac] gfar_clean_rx_ring+0x2e4/0x844
+Call Trace:
+[ec4bfd38] [c06a84c4] _raw_spin_unlock_irqrestore+0x60/0x7c (unreliable)
+[ec4bfda8] [c03f6a44] gfar_poll_rx_sq+0x48/0xe4
+[ec4bfdc8] [c048d504] __napi_poll+0x54/0x26c
+[ec4bfdf8] [c048d908] net_rx_action+0x138/0x2c0
+[ec4bfe68] [c06a8f34] __do_softirq+0x3a4/0x4fc
+[ec4bfed8] [c0040150] run_ksoftirqd+0x58/0x70
+[ec4bfee8] [c0066ecc] smpboot_thread_fn+0x184/0x1cc
+[ec4bff08] [c0062718] kthread+0x140/0x144
+[ec4bff38] [c0012350] ret_from_kernel_thread+0x14/0x1c
+
+This patch fixes this by checking for computed LAST fragment size, so a
+negative sized fragment is never added.
+In order to prevent the newer rx frame from getting corrupted, the FIRST
+flag is checked to discard the incomplete older frame.
+
+Signed-off-by: Michael Braun <michael-dev@fami-braun.de>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/net/ethernet/freescale/gianfar.c | 15 +++++++++++++++
+ 1 file changed, 15 insertions(+)
+
+diff --git a/drivers/net/ethernet/freescale/gianfar.c b/drivers/net/ethernet/freescale/gianfar.c
+index 5cb58ab1eec9..a8959a092344 100644
+--- a/drivers/net/ethernet/freescale/gianfar.c
++++ b/drivers/net/ethernet/freescale/gianfar.c
+@@ -2388,6 +2388,10 @@ static bool gfar_add_rx_frag(struct gfar_rx_buff *rxb, u32 lstatus,
+               if (lstatus & BD_LFLAG(RXBD_LAST))
+                       size -= skb->len;
++              WARN(size < 0, "gianfar: rx fragment size underflow");
++              if (size < 0)
++                      return false;
++
+               skb_add_rx_frag(skb, skb_shinfo(skb)->nr_frags, page,
+                               rxb->page_offset + RXBUF_ALIGNMENT,
+                               size, GFAR_RXB_TRUESIZE);
+@@ -2550,6 +2554,17 @@ static int gfar_clean_rx_ring(struct gfar_priv_rx_q *rx_queue,
+               if (lstatus & BD_LFLAG(RXBD_EMPTY))
+                       break;
++              /* lost RXBD_LAST descriptor due to overrun */
++              if (skb &&
++                  (lstatus & BD_LFLAG(RXBD_FIRST))) {
++                      /* discard faulty buffer */
++                      dev_kfree_skb(skb);
++                      skb = NULL;
++                      rx_queue->stats.rx_dropped++;
++
++                      /* can continue normally */
++              }
++
+               /* order rx buffer descriptor reads */
+               rmb();
+-- 
+2.30.1
+
diff --git a/queue-5.4/gpiolib-acpi-add-missing-irqf_oneshot.patch b/queue-5.4/gpiolib-acpi-add-missing-irqf_oneshot.patch
new file mode 100644 (file)
index 0000000..226311f
--- /dev/null
@@ -0,0 +1,41 @@
+From 580409160af045c5143b1a77bb32df560de830c6 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 23 Feb 2021 16:35:58 +0800
+Subject: gpiolib: acpi: Add missing IRQF_ONESHOT
+
+From: Yang Li <yang.lee@linux.alibaba.com>
+
+[ Upstream commit 6e5d5791730b55a1f987e1db84b078b91eb49e99 ]
+
+fixed the following coccicheck:
+./drivers/gpio/gpiolib-acpi.c:176:7-27: ERROR: Threaded IRQ with no
+primary handler requested without IRQF_ONESHOT
+
+Make sure threaded IRQs without a primary handler are always request
+with IRQF_ONESHOT
+
+Reported-by: Abaci Robot <abaci@linux.alibaba.com>
+Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
+Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
+Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/gpio/gpiolib-acpi.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/gpio/gpiolib-acpi.c b/drivers/gpio/gpiolib-acpi.c
+index b2e186047014..66dcab6ab26d 100644
+--- a/drivers/gpio/gpiolib-acpi.c
++++ b/drivers/gpio/gpiolib-acpi.c
+@@ -174,7 +174,7 @@ static void acpi_gpiochip_request_irq(struct acpi_gpio_chip *acpi_gpio,
+       int ret, value;
+       ret = request_threaded_irq(event->irq, NULL, event->handler,
+-                                 event->irqflags, "ACPI:Event", event);
++                                 event->irqflags | IRQF_ONESHOT, "ACPI:Event", event);
+       if (ret) {
+               dev_err(acpi_gpio->chip->parent,
+                       "Failed to setup interrupt handler for %d\n",
+-- 
+2.30.1
+
diff --git a/queue-5.4/habanalabs-call-put_pid-when-releasing-control-devic.patch b/queue-5.4/habanalabs-call-put_pid-when-releasing-control-devic.patch
new file mode 100644 (file)
index 0000000..08ab9fd
--- /dev/null
@@ -0,0 +1,39 @@
+From ef1e2ea6942388e37dea747f481f198a83a2dca6 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 19 Feb 2021 14:05:33 +0200
+Subject: habanalabs: Call put_pid() when releasing control device
+
+From: Tomer Tayar <ttayar@habana.ai>
+
+[ Upstream commit 27ac5aada024e0821c86540ad18f37edadd77d5e ]
+
+The refcount of the "hl_fpriv" structure is not used for the control
+device, and thus hl_hpriv_put() is not called when releasing this
+device.
+This results with no call to put_pid(), so add it explicitly in
+hl_device_release_ctrl().
+
+Signed-off-by: Tomer Tayar <ttayar@habana.ai>
+Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
+Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/misc/habanalabs/device.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/drivers/misc/habanalabs/device.c b/drivers/misc/habanalabs/device.c
+index 3486bf33474d..e3d943c65419 100644
+--- a/drivers/misc/habanalabs/device.c
++++ b/drivers/misc/habanalabs/device.c
+@@ -108,6 +108,8 @@ static int hl_device_release_ctrl(struct inode *inode, struct file *filp)
+       list_del(&hpriv->dev_node);
+       mutex_unlock(&hdev->fpriv_list_lock);
++      put_pid(hpriv->taskpid);
++
+       kfree(hpriv);
+       return 0;
+-- 
+2.30.1
+
diff --git a/queue-5.4/ia64-fix-ia64_syscall_get_set_arguments-for-break-ba.patch b/queue-5.4/ia64-fix-ia64_syscall_get_set_arguments-for-break-ba.patch
new file mode 100644 (file)
index 0000000..f13d696
--- /dev/null
@@ -0,0 +1,98 @@
+From 43b2480a864c069249d18bf0a54f00da56652da1 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 12 Mar 2021 21:08:23 -0800
+Subject: ia64: fix ia64_syscall_get_set_arguments() for break-based syscalls
+
+From: Sergei Trofimovich <slyfox@gentoo.org>
+
+[ Upstream commit 0ceb1ace4a2778e34a5414e5349712ae4dc41d85 ]
+
+In https://bugs.gentoo.org/769614 Dmitry noticed that
+`ptrace(PTRACE_GET_SYSCALL_INFO)` does not work for syscalls called via
+glibc's syscall() wrapper.
+
+ia64 has two ways to call syscalls from userspace: via `break` and via
+`eps` instructions.
+
+The difference is in stack layout:
+
+1. `eps` creates simple stack frame: no locals, in{0..7} == out{0..8}
+2. `break` uses userspace stack frame: may be locals (glibc provides
+   one), in{0..7} == out{0..8}.
+
+Both work fine in syscall handling cde itself.
+
+But `ptrace(PTRACE_GET_SYSCALL_INFO)` uses unwind mechanism to
+re-extract syscall arguments but it does not account for locals.
+
+The change always skips locals registers. It should not change `eps`
+path as kernel's handler already enforces locals=0 and fixes `break`.
+
+Tested on v5.10 on rx3600 machine (ia64 9040 CPU).
+
+Link: https://lkml.kernel.org/r/20210221002554.333076-1-slyfox@gentoo.org
+Link: https://bugs.gentoo.org/769614
+Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
+Reported-by: Dmitry V. Levin <ldv@altlinux.org>
+Cc: Oleg Nesterov <oleg@redhat.com>
+Cc: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ arch/ia64/kernel/ptrace.c | 24 ++++++++++++++++++------
+ 1 file changed, 18 insertions(+), 6 deletions(-)
+
+diff --git a/arch/ia64/kernel/ptrace.c b/arch/ia64/kernel/ptrace.c
+index bf9c24d9ce84..54e12b0ecebd 100644
+--- a/arch/ia64/kernel/ptrace.c
++++ b/arch/ia64/kernel/ptrace.c
+@@ -2147,27 +2147,39 @@ static void syscall_get_set_args_cb(struct unw_frame_info *info, void *data)
+ {
+       struct syscall_get_set_args *args = data;
+       struct pt_regs *pt = args->regs;
+-      unsigned long *krbs, cfm, ndirty;
++      unsigned long *krbs, cfm, ndirty, nlocals, nouts;
+       int i, count;
+       if (unw_unwind_to_user(info) < 0)
+               return;
++      /*
++       * We get here via a few paths:
++       * - break instruction: cfm is shared with caller.
++       *   syscall args are in out= regs, locals are non-empty.
++       * - epsinstruction: cfm is set by br.call
++       *   locals don't exist.
++       *
++       * For both cases argguments are reachable in cfm.sof - cfm.sol.
++       * CFM: [ ... | sor: 17..14 | sol : 13..7 | sof : 6..0 ]
++       */
+       cfm = pt->cr_ifs;
++      nlocals = (cfm >> 7) & 0x7f; /* aka sol */
++      nouts = (cfm & 0x7f) - nlocals; /* aka sof - sol */
+       krbs = (unsigned long *)info->task + IA64_RBS_OFFSET/8;
+       ndirty = ia64_rse_num_regs(krbs, krbs + (pt->loadrs >> 19));
+       count = 0;
+       if (in_syscall(pt))
+-              count = min_t(int, args->n, cfm & 0x7f);
++              count = min_t(int, args->n, nouts);
++      /* Iterate over outs. */
+       for (i = 0; i < count; i++) {
++              int j = ndirty + nlocals + i + args->i;
+               if (args->rw)
+-                      *ia64_rse_skip_regs(krbs, ndirty + i + args->i) =
+-                              args->args[i];
++                      *ia64_rse_skip_regs(krbs, j) = args->args[i];
+               else
+-                      args->args[i] = *ia64_rse_skip_regs(krbs,
+-                              ndirty + i + args->i);
++                      args->args[i] = *ia64_rse_skip_regs(krbs, j);
+       }
+       if (!args->rw) {
+-- 
+2.30.1
+
diff --git a/queue-5.4/ia64-fix-ptrace-ptrace_syscall_info_exit-sign.patch b/queue-5.4/ia64-fix-ptrace-ptrace_syscall_info_exit-sign.patch
new file mode 100644 (file)
index 0000000..2eda71f
--- /dev/null
@@ -0,0 +1,72 @@
+From 4cac502e4e39865369028df443eb99ab6c4095e2 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 12 Mar 2021 21:08:27 -0800
+Subject: ia64: fix ptrace(PTRACE_SYSCALL_INFO_EXIT) sign
+
+From: Sergei Trofimovich <slyfox@gentoo.org>
+
+[ Upstream commit 61bf318eac2c13356f7bd1c6a05421ef504ccc8a ]
+
+In https://bugs.gentoo.org/769614 Dmitry noticed that
+`ptrace(PTRACE_GET_SYSCALL_INFO)` does not return error sign properly.
+
+The bug is in mismatch between get/set errors:
+
+static inline long syscall_get_error(struct task_struct *task,
+                                     struct pt_regs *regs)
+{
+        return regs->r10 == -1 ? regs->r8:0;
+}
+
+static inline long syscall_get_return_value(struct task_struct *task,
+                                            struct pt_regs *regs)
+{
+        return regs->r8;
+}
+
+static inline void syscall_set_return_value(struct task_struct *task,
+                                            struct pt_regs *regs,
+                                            int error, long val)
+{
+        if (error) {
+                /* error < 0, but ia64 uses > 0 return value */
+                regs->r8 = -error;
+                regs->r10 = -1;
+        } else {
+                regs->r8 = val;
+                regs->r10 = 0;
+        }
+}
+
+Tested on v5.10 on rx3600 machine (ia64 9040 CPU).
+
+Link: https://lkml.kernel.org/r/20210221002554.333076-2-slyfox@gentoo.org
+Link: https://bugs.gentoo.org/769614
+Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
+Reported-by: Dmitry V. Levin <ldv@altlinux.org>
+Reviewed-by: Dmitry V. Levin <ldv@altlinux.org>
+Cc: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
+Cc: Oleg Nesterov <oleg@redhat.com>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ arch/ia64/include/asm/syscall.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/arch/ia64/include/asm/syscall.h b/arch/ia64/include/asm/syscall.h
+index 6c6f16e409a8..0d23c0049301 100644
+--- a/arch/ia64/include/asm/syscall.h
++++ b/arch/ia64/include/asm/syscall.h
+@@ -32,7 +32,7 @@ static inline void syscall_rollback(struct task_struct *task,
+ static inline long syscall_get_error(struct task_struct *task,
+                                    struct pt_regs *regs)
+ {
+-      return regs->r10 == -1 ? regs->r8:0;
++      return regs->r10 == -1 ? -regs->r8:0;
+ }
+ static inline long syscall_get_return_value(struct task_struct *task,
+-- 
+2.30.1
+
diff --git a/queue-5.4/irqchip-ingenic-add-support-for-the-jz4760.patch b/queue-5.4/irqchip-ingenic-add-support-for-the-jz4760.patch
new file mode 100644 (file)
index 0000000..a31c1cd
--- /dev/null
@@ -0,0 +1,46 @@
+From 68409c6b6415ada6829798d566e9017cfda09cef Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Sun, 7 Mar 2021 17:20:14 +0000
+Subject: irqchip/ingenic: Add support for the JZ4760
+
+From: Paul Cercueil <paul@crapouillou.net>
+
+[ Upstream commit 5fbecd2389f48e1415799c63130d0cdce1cf3f60 ]
+
+Add support for the interrupt controller found in the JZ4760 SoC, which
+works exactly like the one in the JZ4770.
+
+Signed-off-by: Paul Cercueil <paul@crapouillou.net>
+Signed-off-by: Marc Zyngier <maz@kernel.org>
+Link: https://lore.kernel.org/r/20210307172014.73481-2-paul@crapouillou.net
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/irqchip/irq-ingenic-tcu.c | 1 +
+ drivers/irqchip/irq-ingenic.c     | 1 +
+ 2 files changed, 2 insertions(+)
+
+diff --git a/drivers/irqchip/irq-ingenic-tcu.c b/drivers/irqchip/irq-ingenic-tcu.c
+index 6d05cefe9d79..02a82723a57a 100644
+--- a/drivers/irqchip/irq-ingenic-tcu.c
++++ b/drivers/irqchip/irq-ingenic-tcu.c
+@@ -179,4 +179,5 @@ static int __init ingenic_tcu_irq_init(struct device_node *np,
+ }
+ IRQCHIP_DECLARE(jz4740_tcu_irq, "ingenic,jz4740-tcu", ingenic_tcu_irq_init);
+ IRQCHIP_DECLARE(jz4725b_tcu_irq, "ingenic,jz4725b-tcu", ingenic_tcu_irq_init);
++IRQCHIP_DECLARE(jz4760_tcu_irq, "ingenic,jz4760-tcu", ingenic_tcu_irq_init);
+ IRQCHIP_DECLARE(jz4770_tcu_irq, "ingenic,jz4770-tcu", ingenic_tcu_irq_init);
+diff --git a/drivers/irqchip/irq-ingenic.c b/drivers/irqchip/irq-ingenic.c
+index dda512dfe2c1..31bc11f15bfa 100644
+--- a/drivers/irqchip/irq-ingenic.c
++++ b/drivers/irqchip/irq-ingenic.c
+@@ -168,6 +168,7 @@ static int __init intc_2chip_of_init(struct device_node *node,
+ {
+       return ingenic_intc_of_init(node, 2);
+ }
++IRQCHIP_DECLARE(jz4760_intc, "ingenic,jz4760-intc", intc_2chip_of_init);
+ IRQCHIP_DECLARE(jz4770_intc, "ingenic,jz4770-intc", intc_2chip_of_init);
+ IRQCHIP_DECLARE(jz4775_intc, "ingenic,jz4775-intc", intc_2chip_of_init);
+ IRQCHIP_DECLARE(jz4780_intc, "ingenic,jz4780-intc", intc_2chip_of_init);
+-- 
+2.30.1
+
diff --git a/queue-5.4/ixgbe-fix-memleak-in-ixgbe_configure_clsu32.patch b/queue-5.4/ixgbe-fix-memleak-in-ixgbe_configure_clsu32.patch
new file mode 100644 (file)
index 0000000..bcc6ff5
--- /dev/null
@@ -0,0 +1,42 @@
+From 96c4158d3d3c6e8d28218199f61c1583f3dff326 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Sun, 3 Jan 2021 16:08:42 +0800
+Subject: ixgbe: Fix memleak in ixgbe_configure_clsu32
+
+From: Dinghao Liu <dinghao.liu@zju.edu.cn>
+
+[ Upstream commit 7a766381634da19fc837619b0a34590498d9d29a ]
+
+When ixgbe_fdir_write_perfect_filter_82599() fails,
+input allocated by kzalloc() has not been freed,
+which leads to memleak.
+
+Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
+Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>
+Tested-by: Tony Brelinski <tonyx.brelinski@intel.com>
+Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+index f60554064403..1b8e70585c44 100644
+--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
++++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+@@ -9595,8 +9595,10 @@ static int ixgbe_configure_clsu32(struct ixgbe_adapter *adapter,
+       ixgbe_atr_compute_perfect_hash_82599(&input->filter, mask);
+       err = ixgbe_fdir_write_perfect_filter_82599(hw, &input->filter,
+                                                   input->sw_idx, queue);
+-      if (!err)
+-              ixgbe_update_ethtool_fdir_entry(adapter, input, input->sw_idx);
++      if (err)
++              goto err_out_w_lock;
++
++      ixgbe_update_ethtool_fdir_entry(adapter, input, input->sw_idx);
+       spin_unlock(&adapter->fdir_perfect_lock);
+       if ((uhtid != 0x800) && (adapter->jump_tables[uhtid]))
+-- 
+2.30.1
+
diff --git a/queue-5.4/net-davicom-use-platform_get_irq_optional.patch b/queue-5.4/net-davicom-use-platform_get_irq_optional.patch
new file mode 100644 (file)
index 0000000..8048c47
--- /dev/null
@@ -0,0 +1,35 @@
+From 0dd5d432ceab100e33ca0532ab63e26860e8a26a Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Sun, 7 Mar 2021 13:17:49 +0000
+Subject: net: davicom: Use platform_get_irq_optional()
+
+From: Paul Cercueil <paul@crapouillou.net>
+
+[ Upstream commit 2e2696223676d56db1a93acfca722c1b96cd552d ]
+
+The second IRQ line really is optional, so use
+platform_get_irq_optional() to obtain it.
+
+Signed-off-by: Paul Cercueil <paul@crapouillou.net>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/net/ethernet/davicom/dm9000.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/net/ethernet/davicom/dm9000.c b/drivers/net/ethernet/davicom/dm9000.c
+index 0928bec79fe4..4b958681d66e 100644
+--- a/drivers/net/ethernet/davicom/dm9000.c
++++ b/drivers/net/ethernet/davicom/dm9000.c
+@@ -1512,7 +1512,7 @@ dm9000_probe(struct platform_device *pdev)
+               goto out;
+       }
+-      db->irq_wake = platform_get_irq(pdev, 1);
++      db->irq_wake = platform_get_irq_optional(pdev, 1);
+       if (db->irq_wake >= 0) {
+               dev_dbg(db->dev, "wakeup irq %d\n", db->irq_wake);
+-- 
+2.30.1
+
diff --git a/queue-5.4/net-fec-ptp-avoid-register-access-when-ipg-clock-is-.patch b/queue-5.4/net-fec-ptp-avoid-register-access-when-ipg-clock-is-.patch
new file mode 100644 (file)
index 0000000..06c07b2
--- /dev/null
@@ -0,0 +1,53 @@
+From e8e7a853ffb56da66cdb1124ca7954fba0fc02f8 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 25 Feb 2021 22:15:16 +0100
+Subject: net: fec: ptp: avoid register access when ipg clock is disabled
+
+From: Heiko Thiery <heiko.thiery@gmail.com>
+
+[ Upstream commit 6a4d7234ae9a3bb31181f348ade9bbdb55aeb5c5 ]
+
+When accessing the timecounter register on an i.MX8MQ the kernel hangs.
+This is only the case when the interface is down. This can be reproduced
+by reading with 'phc_ctrl eth0 get'.
+
+Like described in the change in 91c0d987a9788dcc5fe26baafd73bf9242b68900
+the igp clock is disabled when the interface is down and leads to a
+system hang.
+
+So we check if the ptp clock status before reading the timecounter
+register.
+
+Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
+Acked-by: Richard Cochran <richardcochran@gmail.com>
+Link: https://lore.kernel.org/r/20210225211514.9115-1-heiko.thiery@gmail.com
+Signed-off-by: Jakub Kicinski <kuba@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/net/ethernet/freescale/fec_ptp.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/drivers/net/ethernet/freescale/fec_ptp.c b/drivers/net/ethernet/freescale/fec_ptp.c
+index 945643c02615..49fad118988b 100644
+--- a/drivers/net/ethernet/freescale/fec_ptp.c
++++ b/drivers/net/ethernet/freescale/fec_ptp.c
+@@ -382,9 +382,16 @@ static int fec_ptp_gettime(struct ptp_clock_info *ptp, struct timespec64 *ts)
+       u64 ns;
+       unsigned long flags;
++      mutex_lock(&adapter->ptp_clk_mutex);
++      /* Check the ptp clock */
++      if (!adapter->ptp_clk_on) {
++              mutex_unlock(&adapter->ptp_clk_mutex);
++              return -EINVAL;
++      }
+       spin_lock_irqsave(&adapter->tmreg_lock, flags);
+       ns = timecounter_read(&adapter->tc);
+       spin_unlock_irqrestore(&adapter->tmreg_lock, flags);
++      mutex_unlock(&adapter->ptp_clk_mutex);
+       *ts = ns_to_timespec64(ns);
+-- 
+2.30.1
+
diff --git a/queue-5.4/net-hisilicon-hns-fix-error-return-code-of-hns_nic_c.patch b/queue-5.4/net-hisilicon-hns-fix-error-return-code-of-hns_nic_c.patch
new file mode 100644 (file)
index 0000000..dcfdc60
--- /dev/null
@@ -0,0 +1,41 @@
+From 5b5334200b1748b048e6202446b985e3517304a1 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Sun, 7 Mar 2021 00:40:12 -0800
+Subject: net: hisilicon: hns: fix error return code of
+ hns_nic_clear_all_rx_fetch()
+
+From: Jia-Ju Bai <baijiaju1990@gmail.com>
+
+[ Upstream commit 143c253f42bad20357e7e4432087aca747c43384 ]
+
+When hns_assemble_skb() returns NULL to skb, no error return code of
+hns_nic_clear_all_rx_fetch() is assigned.
+To fix this bug, ret is assigned with -ENOMEM in this case.
+
+Reported-by: TOTE Robot <oslab@tsinghua.edu.cn>
+Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/net/ethernet/hisilicon/hns/hns_enet.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/net/ethernet/hisilicon/hns/hns_enet.c b/drivers/net/ethernet/hisilicon/hns/hns_enet.c
+index 6d5d53cfc7ab..7516f6823090 100644
+--- a/drivers/net/ethernet/hisilicon/hns/hns_enet.c
++++ b/drivers/net/ethernet/hisilicon/hns/hns_enet.c
+@@ -1677,8 +1677,10 @@ static int hns_nic_clear_all_rx_fetch(struct net_device *ndev)
+                       for (j = 0; j < fetch_num; j++) {
+                               /* alloc one skb and init */
+                               skb = hns_assemble_skb(ndev);
+-                              if (!skb)
++                              if (!skb) {
++                                      ret = -ENOMEM;
+                                       goto out;
++                              }
+                               rd = &tx_ring_data(priv, skb->queue_mapping);
+                               hns_nic_net_xmit_hw(ndev, skb, rd);
+-- 
+2.30.1
+
diff --git a/queue-5.4/net-intel-iavf-fix-error-return-code-of-iavf_init_ge.patch b/queue-5.4/net-intel-iavf-fix-error-return-code-of-iavf_init_ge.patch
new file mode 100644 (file)
index 0000000..82e5b03
--- /dev/null
@@ -0,0 +1,39 @@
+From 03020c431ce421faff29b60f17c6ee563e486dbd Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 4 Mar 2021 19:10:10 -0800
+Subject: net: intel: iavf: fix error return code of iavf_init_get_resources()
+
+From: Jia-Ju Bai <baijiaju1990@gmail.com>
+
+[ Upstream commit 6650d31f21b8a0043613ae0a4a2e42e49dc20b2d ]
+
+When iavf_process_config() fails, no error return code of
+iavf_init_get_resources() is assigned.
+To fix this bug, err is assigned with the return value of
+iavf_process_config(), and then err is checked.
+
+Reported-by: TOTE Robot <oslab@tsinghua.edu.cn>
+Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/net/ethernet/intel/iavf/iavf_main.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/net/ethernet/intel/iavf/iavf_main.c b/drivers/net/ethernet/intel/iavf/iavf_main.c
+index 56e6bec9af79..cffc8c1044f2 100644
+--- a/drivers/net/ethernet/intel/iavf/iavf_main.c
++++ b/drivers/net/ethernet/intel/iavf/iavf_main.c
+@@ -1786,7 +1786,8 @@ static int iavf_init_get_resources(struct iavf_adapter *adapter)
+               goto err_alloc;
+       }
+-      if (iavf_process_config(adapter))
++      err = iavf_process_config(adapter);
++      if (err)
+               goto err_alloc;
+       adapter->current_op = VIRTCHNL_OP_UNKNOWN;
+-- 
+2.30.1
+
diff --git a/queue-5.4/net-tehuti-fix-error-return-code-in-bdx_probe.patch b/queue-5.4/net-tehuti-fix-error-return-code-in-bdx_probe.patch
new file mode 100644 (file)
index 0000000..1c0af18
--- /dev/null
@@ -0,0 +1,36 @@
+From fca322d0ffba2c8cf2d08d35a0c229d0a8087313 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 4 Mar 2021 18:06:48 -0800
+Subject: net: tehuti: fix error return code in bdx_probe()
+
+From: Jia-Ju Bai <baijiaju1990@gmail.com>
+
+[ Upstream commit 38c26ff3048af50eee3fcd591921357ee5bfd9ee ]
+
+When bdx_read_mac() fails, no error return code of bdx_probe()
+is assigned.
+To fix this bug, err is assigned with -EFAULT as error return code.
+
+Reported-by: TOTE Robot <oslab@tsinghua.edu.cn>
+Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/net/ethernet/tehuti/tehuti.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/drivers/net/ethernet/tehuti/tehuti.c b/drivers/net/ethernet/tehuti/tehuti.c
+index 0f8a924fc60c..c6c1bb15557f 100644
+--- a/drivers/net/ethernet/tehuti/tehuti.c
++++ b/drivers/net/ethernet/tehuti/tehuti.c
+@@ -2052,6 +2052,7 @@ bdx_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
+               /*bdx_hw_reset(priv); */
+               if (bdx_read_mac(priv)) {
+                       pr_err("load MAC address failed\n");
++                      err = -EFAULT;
+                       goto err_out_iomap;
+               }
+               SET_NETDEV_DEV(ndev, &pdev->dev);
+-- 
+2.30.1
+
diff --git a/queue-5.4/net-wan-fix-error-return-code-of-uhdlc_init.patch b/queue-5.4/net-wan-fix-error-return-code-of-uhdlc_init.patch
new file mode 100644 (file)
index 0000000..6c2e1f4
--- /dev/null
@@ -0,0 +1,49 @@
+From 2912c1af9127253364539cdfad8f7903e972393b Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Sun, 7 Mar 2021 01:12:56 -0800
+Subject: net: wan: fix error return code of uhdlc_init()
+
+From: Jia-Ju Bai <baijiaju1990@gmail.com>
+
+[ Upstream commit 62765d39553cfd1ad340124fe1e280450e8c89e2 ]
+
+When priv->rx_skbuff or priv->tx_skbuff is NULL, no error return code of
+uhdlc_init() is assigned.
+To fix this bug, ret is assigned with -ENOMEM in these cases.
+
+Reported-by: TOTE Robot <oslab@tsinghua.edu.cn>
+Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/net/wan/fsl_ucc_hdlc.c | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/net/wan/fsl_ucc_hdlc.c b/drivers/net/wan/fsl_ucc_hdlc.c
+index 4ad0a0c33d85..034eb6535ab7 100644
+--- a/drivers/net/wan/fsl_ucc_hdlc.c
++++ b/drivers/net/wan/fsl_ucc_hdlc.c
+@@ -204,14 +204,18 @@ static int uhdlc_init(struct ucc_hdlc_private *priv)
+       priv->rx_skbuff = kcalloc(priv->rx_ring_size,
+                                 sizeof(*priv->rx_skbuff),
+                                 GFP_KERNEL);
+-      if (!priv->rx_skbuff)
++      if (!priv->rx_skbuff) {
++              ret = -ENOMEM;
+               goto free_ucc_pram;
++      }
+       priv->tx_skbuff = kcalloc(priv->tx_ring_size,
+                                 sizeof(*priv->tx_skbuff),
+                                 GFP_KERNEL);
+-      if (!priv->tx_skbuff)
++      if (!priv->tx_skbuff) {
++              ret = -ENOMEM;
+               goto free_rx_skbuff;
++      }
+       priv->skb_curtx = 0;
+       priv->skb_dirtytx = 0;
+-- 
+2.30.1
+
diff --git a/queue-5.4/nfs-correct-size-calculation-for-create-reply-length.patch b/queue-5.4/nfs-correct-size-calculation-for-create-reply-length.patch
new file mode 100644 (file)
index 0000000..7cb6382
--- /dev/null
@@ -0,0 +1,49 @@
+From 3834bef21a3f389116837fc684a78d4d8227f1c7 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Mon, 8 Mar 2021 12:12:13 -0600
+Subject: NFS: Correct size calculation for create reply length
+
+From: Frank Sorenson <sorenson@redhat.com>
+
+[ Upstream commit ad3dbe35c833c2d4d0bbf3f04c785d32f931e7c9 ]
+
+CREATE requests return a post_op_fh3, rather than nfs_fh3. The
+post_op_fh3 includes an extra word to indicate 'handle_follows'.
+
+Without that additional word, create fails when full 64-byte
+filehandles are in use.
+
+Add NFS3_post_op_fh_sz, and correct the size calculation for
+NFS3_createres_sz.
+
+Signed-off-by: Frank Sorenson <sorenson@redhat.com>
+Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ fs/nfs/nfs3xdr.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/fs/nfs/nfs3xdr.c b/fs/nfs/nfs3xdr.c
+index 1f60ab2535ee..23d75cddbb2e 100644
+--- a/fs/nfs/nfs3xdr.c
++++ b/fs/nfs/nfs3xdr.c
+@@ -35,6 +35,7 @@
+  */
+ #define NFS3_fhandle_sz               (1+16)
+ #define NFS3_fh_sz            (NFS3_fhandle_sz)       /* shorthand */
++#define NFS3_post_op_fh_sz    (1+NFS3_fh_sz)
+ #define NFS3_sattr_sz         (15)
+ #define NFS3_filename_sz      (1+(NFS3_MAXNAMLEN>>2))
+ #define NFS3_path_sz          (1+(NFS3_MAXPATHLEN>>2))
+@@ -72,7 +73,7 @@
+ #define NFS3_readlinkres_sz   (1+NFS3_post_op_attr_sz+1+1)
+ #define NFS3_readres_sz               (1+NFS3_post_op_attr_sz+3+1)
+ #define NFS3_writeres_sz      (1+NFS3_wcc_data_sz+4)
+-#define NFS3_createres_sz     (1+NFS3_fh_sz+NFS3_post_op_attr_sz+NFS3_wcc_data_sz)
++#define NFS3_createres_sz     (1+NFS3_post_op_fh_sz+NFS3_post_op_attr_sz+NFS3_wcc_data_sz)
+ #define NFS3_renameres_sz     (1+(2 * NFS3_wcc_data_sz))
+ #define NFS3_linkres_sz               (1+NFS3_post_op_attr_sz+NFS3_wcc_data_sz)
+ #define NFS3_readdirres_sz    (1+NFS3_post_op_attr_sz+2+1)
+-- 
+2.30.1
+
diff --git a/queue-5.4/nfs-fix-pnfs_flexfile_layout-kconfig-default.patch b/queue-5.4/nfs-fix-pnfs_flexfile_layout-kconfig-default.patch
new file mode 100644 (file)
index 0000000..f5e284c
--- /dev/null
@@ -0,0 +1,36 @@
+From f5dc6b5318504b66ec8efdd3b0f115d742fa1ff6 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 23 Feb 2021 15:19:01 +0100
+Subject: nfs: fix PNFS_FLEXFILE_LAYOUT Kconfig default
+
+From: Timo Rothenpieler <timo@rothenpieler.org>
+
+[ Upstream commit a0590473c5e6c4ef17c3132ad08fbad170f72d55 ]
+
+This follows what was done in 8c2fabc6542d9d0f8b16bd1045c2eda59bdcde13.
+With the default being m, it's impossible to build the module into the
+kernel.
+
+Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
+Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ fs/nfs/Kconfig | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/fs/nfs/Kconfig b/fs/nfs/Kconfig
+index e7dd07f47825..e84c187d942e 100644
+--- a/fs/nfs/Kconfig
++++ b/fs/nfs/Kconfig
+@@ -127,7 +127,7 @@ config PNFS_BLOCK
+ config PNFS_FLEXFILE_LAYOUT
+       tristate
+       depends on NFS_V4_1 && NFS_V3
+-      default m
++      default NFS_V4
+ config NFS_V4_1_IMPLEMENTATION_ID_DOMAIN
+       string "NFSv4.1 Implementation ID Domain"
+-- 
+2.30.1
+
diff --git a/queue-5.4/nfs-we-don-t-support-removing-system.nfs4_acl.patch b/queue-5.4/nfs-we-don-t-support-removing-system.nfs4_acl.patch
new file mode 100644 (file)
index 0000000..5286155
--- /dev/null
@@ -0,0 +1,40 @@
+From ba65cb2c6267e5df5ba06ec57f82d7ccef6f15b9 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 28 Jan 2021 17:36:38 -0500
+Subject: nfs: we don't support removing system.nfs4_acl
+
+From: J. Bruce Fields <bfields@redhat.com>
+
+[ Upstream commit 4f8be1f53bf615102d103c0509ffa9596f65b718 ]
+
+The NFSv4 protocol doesn't have any notion of reomoving an attribute, so
+removexattr(path,"system.nfs4_acl") doesn't make sense.
+
+There's no documented return value.  Arguably it could be EOPNOTSUPP but
+I'm a little worried an application might take that to mean that we
+don't support ACLs or xattrs.  How about EINVAL?
+
+Signed-off-by: J. Bruce Fields <bfields@redhat.com>
+Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ fs/nfs/nfs4proc.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
+index b2119159dead..304ab4cdaa8c 100644
+--- a/fs/nfs/nfs4proc.c
++++ b/fs/nfs/nfs4proc.c
+@@ -5754,6 +5754,9 @@ static int __nfs4_proc_set_acl(struct inode *inode, const void *buf, size_t bufl
+       unsigned int npages = DIV_ROUND_UP(buflen, PAGE_SIZE);
+       int ret, i;
++      /* You can't remove system.nfs4_acl: */
++      if (buflen == 0)
++              return -EINVAL;
+       if (!nfs4_server_supports_acls(server))
+               return -EOPNOTSUPP;
+       if (npages > ARRAY_SIZE(pages))
+-- 
+2.30.1
+
diff --git a/queue-5.4/nvme-add-nvme_req_cancelled-flag-in-nvme_cancel_requ.patch b/queue-5.4/nvme-add-nvme_req_cancelled-flag-in-nvme_cancel_requ.patch
new file mode 100644 (file)
index 0000000..0b38122
--- /dev/null
@@ -0,0 +1,40 @@
+From b11c98d8305acf102f31c3d71b550544f0da6a3c Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 26 Feb 2021 08:17:26 +0100
+Subject: nvme: add NVME_REQ_CANCELLED flag in nvme_cancel_request()
+
+From: Hannes Reinecke <hare@suse.de>
+
+[ Upstream commit d3589381987ec879b03f8ce3039df57e87f05901 ]
+
+NVME_REQ_CANCELLED is translated into -EINTR in nvme_submit_sync_cmd(),
+so we should be setting this flags during nvme_cancel_request() to
+ensure that the callers to nvme_submit_sync_cmd() will get the correct
+error code when the controller is reset.
+
+Signed-off-by: Hannes Reinecke <hare@suse.de>
+Reviewed-by: Keith Busch <kbusch@kernel.org>
+Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
+Reviewed-by: Chao Leng <lengchao@huawei.com>
+Reviewed-by: Daniel Wagner <dwagner@suse.de>
+Signed-off-by: Christoph Hellwig <hch@lst.de>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/nvme/host/core.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
+index 308f3a28e12a..67ea531e8b34 100644
+--- a/drivers/nvme/host/core.c
++++ b/drivers/nvme/host/core.c
+@@ -312,6 +312,7 @@ bool nvme_cancel_request(struct request *req, void *data, bool reserved)
+               return true;
+       nvme_req(req)->status = NVME_SC_HOST_ABORTED_CMD;
++      nvme_req(req)->flags |= NVME_REQ_CANCELLED;
+       blk_mq_complete_request(req);
+       return true;
+ }
+-- 
+2.30.1
+
diff --git a/queue-5.4/nvme-fc-return-nvme_sc_host_aborted_cmd-when-a-comma.patch b/queue-5.4/nvme-fc-return-nvme_sc_host_aborted_cmd-when-a-comma.patch
new file mode 100644 (file)
index 0000000..675ea7c
--- /dev/null
@@ -0,0 +1,39 @@
+From 3a55f3fbf642b5db2205d6d2baeddce4f9c22c03 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 26 Feb 2021 08:17:28 +0100
+Subject: nvme-fc: return NVME_SC_HOST_ABORTED_CMD when a command has been
+ aborted
+
+From: Hannes Reinecke <hare@suse.de>
+
+[ Upstream commit ae3afe6308b43bbf49953101d4ba2c1c481133a8 ]
+
+When a command has been aborted we should return NVME_SC_HOST_ABORTED_CMD
+to be consistent with the other transports.
+
+Signed-off-by: Hannes Reinecke <hare@suse.de>
+Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
+Reviewed-by: James Smart <jsmart2021@gmail.com>
+Reviewed-by: Daniel Wagner <dwagner@suse.de>
+Signed-off-by: Christoph Hellwig <hch@lst.de>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/nvme/host/fc.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/nvme/host/fc.c b/drivers/nvme/host/fc.c
+index 65b3dc9cd693..0d2c22cf12a0 100644
+--- a/drivers/nvme/host/fc.c
++++ b/drivers/nvme/host/fc.c
+@@ -1608,7 +1608,7 @@ nvme_fc_fcpio_done(struct nvmefc_fcp_req *req)
+                               sizeof(op->rsp_iu), DMA_FROM_DEVICE);
+       if (opstate == FCPOP_STATE_ABORTED)
+-              status = cpu_to_le16(NVME_SC_HOST_PATH_ERROR << 1);
++              status = cpu_to_le16(NVME_SC_HOST_ABORTED_CMD << 1);
+       else if (freq->status) {
+               status = cpu_to_le16(NVME_SC_HOST_PATH_ERROR << 1);
+               dev_info(ctrl->ctrl.device,
+-- 
+2.30.1
+
diff --git a/queue-5.4/nvme-pci-add-the-disable_write_zeroes-quirk-for-a-sa.patch b/queue-5.4/nvme-pci-add-the-disable_write_zeroes-quirk-for-a-sa.patch
new file mode 100644 (file)
index 0000000..6c282af
--- /dev/null
@@ -0,0 +1,74 @@
+From 55097284608f8c9920afe20e03f731a7d3cf3edd Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 10 Mar 2021 12:06:41 +0000
+Subject: nvme-pci: add the DISABLE_WRITE_ZEROES quirk for a Samsung PM1725a
+
+From: Dmitry Monakhov <dmtrmonakhov@yandex-team.ru>
+
+[ Upstream commit abbb5f5929ec6c52574c430c5475c158a65c2a8c ]
+
+This adds a quirk for Samsung PM1725a drive which fixes timeouts and
+I/O errors due to the fact that the controller does not properly
+handle the Write Zeroes command, dmesg log:
+
+nvme nvme0: I/O 528 QID 10 timeout, aborting
+nvme nvme0: I/O 529 QID 10 timeout, aborting
+nvme nvme0: I/O 530 QID 10 timeout, aborting
+nvme nvme0: I/O 531 QID 10 timeout, aborting
+nvme nvme0: I/O 532 QID 10 timeout, aborting
+nvme nvme0: I/O 533 QID 10 timeout, aborting
+nvme nvme0: I/O 534 QID 10 timeout, aborting
+nvme nvme0: I/O 535 QID 10 timeout, aborting
+nvme nvme0: Abort status: 0x0
+nvme nvme0: Abort status: 0x0
+nvme nvme0: Abort status: 0x0
+nvme nvme0: Abort status: 0x0
+nvme nvme0: Abort status: 0x0
+nvme nvme0: Abort status: 0x0
+nvme nvme0: Abort status: 0x0
+nvme nvme0: Abort status: 0x0
+nvme nvme0: I/O 528 QID 10 timeout, reset controller
+nvme nvme0: controller is down; will reset: CSTS=0x3, PCI_STATUS=0x10
+nvme nvme0: Device not ready; aborting reset, CSTS=0x3
+nvme nvme0: Device not ready; aborting reset, CSTS=0x3
+nvme nvme0: Removing after probe failure status: -19
+nvme0n1: detected capacity change from 6251233968 to 0
+blk_update_request: I/O error, dev nvme0n1, sector 32776 op 0x1:(WRITE) flags 0x3000 phys_seg 6 prio class 0
+blk_update_request: I/O error, dev nvme0n1, sector 113319936 op 0x9:(WRITE_ZEROES) flags 0x800 phys_seg 0 prio class 0
+Buffer I/O error on dev nvme0n1p2, logical block 1, lost async page write
+blk_update_request: I/O error, dev nvme0n1, sector 113319680 op 0x9:(WRITE_ZEROES) flags 0x0 phys_seg 0 prio class 0
+Buffer I/O error on dev nvme0n1p2, logical block 2, lost async page write
+blk_update_request: I/O error, dev nvme0n1, sector 113319424 op 0x9:(WRITE_ZEROES) flags 0x0 phys_seg 0 prio class 0
+Buffer I/O error on dev nvme0n1p2, logical block 3, lost async page write
+blk_update_request: I/O error, dev nvme0n1, sector 113319168 op 0x9:(WRITE_ZEROES) flags 0x0 phys_seg 0 prio class 0
+Buffer I/O error on dev nvme0n1p2, logical block 4, lost async page write
+blk_update_request: I/O error, dev nvme0n1, sector 113318912 op 0x9:(WRITE_ZEROES) flags 0x0 phys_seg 0 prio class 0
+Buffer I/O error on dev nvme0n1p2, logical block 5, lost async page write
+blk_update_request: I/O error, dev nvme0n1, sector 113318656 op 0x9:(WRITE_ZEROES) flags 0x0 phys_seg 0 prio class 0
+Buffer I/O error on dev nvme0n1p2, logical block 6, lost async page write
+blk_update_request: I/O error, dev nvme0n1, sector 113318400 op 0x9:(WRITE_ZEROES) flags 0x0 phys_seg 0 prio class 0
+blk_update_request: I/O error, dev nvme0n1, sector 113318144 op 0x9:(WRITE_ZEROES) flags 0x0 phys_seg 0 prio class 0
+blk_update_request: I/O error, dev nvme0n1, sector 113317888 op 0x9:(WRITE_ZEROES) flags 0x0 phys_seg 0 prio class 0
+
+Signed-off-by: Dmitry Monakhov <dmtrmonakhov@yandex-team.ru>
+Signed-off-by: Christoph Hellwig <hch@lst.de>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/nvme/host/pci.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
+index fc18738dcf8f..3bee3724e9fa 100644
+--- a/drivers/nvme/host/pci.c
++++ b/drivers/nvme/host/pci.c
+@@ -3176,6 +3176,7 @@ static const struct pci_device_id nvme_id_table[] = {
+               .driver_data = NVME_QUIRK_DELAY_BEFORE_CHK_RDY, },
+       { PCI_DEVICE(0x144d, 0xa822),   /* Samsung PM1725a */
+               .driver_data = NVME_QUIRK_DELAY_BEFORE_CHK_RDY |
++                              NVME_QUIRK_DISABLE_WRITE_ZEROES|
+                               NVME_QUIRK_IGNORE_DEV_SUBNQN, },
+       { PCI_DEVICE(0x1987, 0x5016),   /* Phison E16 */
+               .driver_data = NVME_QUIRK_IGNORE_DEV_SUBNQN, },
+-- 
+2.30.1
+
diff --git a/queue-5.4/powerpc-4xx-fix-build-errors-from-mfdcr.patch b/queue-5.4/powerpc-4xx-fix-build-errors-from-mfdcr.patch
new file mode 100644 (file)
index 0000000..2f19bbb
--- /dev/null
@@ -0,0 +1,72 @@
+From 7688d5ec32b81cacfb86b012a9c088dd4e281cc5 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 18 Feb 2021 23:30:58 +1100
+Subject: powerpc/4xx: Fix build errors from mfdcr()
+
+From: Michael Ellerman <mpe@ellerman.id.au>
+
+[ Upstream commit eead089311f4d935ab5d1d8fbb0c42ad44699ada ]
+
+lkp reported a build error in fsp2.o:
+
+  CC      arch/powerpc/platforms/44x/fsp2.o
+  {standard input}:577: Error: unsupported relocation against base
+
+Which comes from:
+
+  pr_err("GESR0: 0x%08x\n", mfdcr(base + PLB4OPB_GESR0));
+
+Where our mfdcr() macro is stringifying "base + PLB4OPB_GESR0", and
+passing that to the assembler, which obviously doesn't work.
+
+The mfdcr() macro already checks that the argument is constant using
+__builtin_constant_p(), and if not calls the out-of-line version of
+mfdcr(). But in this case GCC is smart enough to notice that "base +
+PLB4OPB_GESR0" will be constant, even though it's not something we can
+immediately stringify into a register number.
+
+Segher pointed out that passing the register number to the inline asm
+as a constant would be better, and in fact it fixes the build error,
+presumably because it gives GCC a chance to resolve the value.
+
+While we're at it, change mtdcr() similarly.
+
+Reported-by: kernel test robot <lkp@intel.com>
+Suggested-by: Segher Boessenkool <segher@kernel.crashing.org>
+Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
+Acked-by: Feng Tang <feng.tang@intel.com>
+Link: https://lore.kernel.org/r/20210218123058.748882-1-mpe@ellerman.id.au
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ arch/powerpc/include/asm/dcr-native.h | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/arch/powerpc/include/asm/dcr-native.h b/arch/powerpc/include/asm/dcr-native.h
+index 7141ccea8c94..a92059964579 100644
+--- a/arch/powerpc/include/asm/dcr-native.h
++++ b/arch/powerpc/include/asm/dcr-native.h
+@@ -53,8 +53,8 @@ static inline void mtdcrx(unsigned int reg, unsigned int val)
+ #define mfdcr(rn)                                             \
+       ({unsigned int rval;                                    \
+       if (__builtin_constant_p(rn) && rn < 1024)              \
+-              asm volatile("mfdcr %0," __stringify(rn)        \
+-                            : "=r" (rval));                   \
++              asm volatile("mfdcr %0, %1" : "=r" (rval)       \
++                            : "n" (rn));                      \
+       else if (likely(cpu_has_feature(CPU_FTR_INDEXED_DCR)))  \
+               rval = mfdcrx(rn);                              \
+       else                                                    \
+@@ -64,8 +64,8 @@ static inline void mtdcrx(unsigned int reg, unsigned int val)
+ #define mtdcr(rn, v)                                          \
+ do {                                                          \
+       if (__builtin_constant_p(rn) && rn < 1024)              \
+-              asm volatile("mtdcr " __stringify(rn) ",%0"     \
+-                            : : "r" (v));                     \
++              asm volatile("mtdcr %0, %1"                     \
++                            : : "n" (rn), "r" (v));           \
+       else if (likely(cpu_has_feature(CPU_FTR_INDEXED_DCR)))  \
+               mtdcrx(rn, v);                                  \
+       else                                                    \
+-- 
+2.30.1
+
diff --git a/queue-5.4/regulator-qcom-rpmh-correct-the-pmic5_hfsmps515-buck.patch b/queue-5.4/regulator-qcom-rpmh-correct-the-pmic5_hfsmps515-buck.patch
new file mode 100644 (file)
index 0000000..dd7479b
--- /dev/null
@@ -0,0 +1,38 @@
+From b4d1a8a5fa7e113834f0e029bebcc02a405c6173 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 24 Feb 2021 14:03:08 +0530
+Subject: regulator: qcom-rpmh: Correct the pmic5_hfsmps515 buck
+
+From: satya priya <skakit@codeaurora.org>
+
+[ Upstream commit e610e072c87a30658479a7b4c51e1801cb3f450c ]
+
+Correct the REGULATOR_LINEAR_RANGE and n_voltges for
+pmic5_hfsmps515 buck.
+
+Signed-off-by: satya priya <skakit@codeaurora.org>
+Link: https://lore.kernel.org/r/1614155592-14060-4-git-send-email-skakit@codeaurora.org
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/regulator/qcom-rpmh-regulator.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/regulator/qcom-rpmh-regulator.c b/drivers/regulator/qcom-rpmh-regulator.c
+index 68d22acdb037..2de7af13288e 100644
+--- a/drivers/regulator/qcom-rpmh-regulator.c
++++ b/drivers/regulator/qcom-rpmh-regulator.c
+@@ -726,8 +726,8 @@ static const struct rpmh_vreg_hw_data pmic5_ftsmps510 = {
+ static const struct rpmh_vreg_hw_data pmic5_hfsmps515 = {
+       .regulator_type = VRM,
+       .ops = &rpmh_regulator_vrm_ops,
+-      .voltage_range = REGULATOR_LINEAR_RANGE(2800000, 0, 4, 16000),
+-      .n_voltages = 5,
++      .voltage_range = REGULATOR_LINEAR_RANGE(320000, 0, 235, 16000),
++      .n_voltages = 236,
+       .pmic_mode_map = pmic_mode_map_pmic5_smps,
+       .of_map_mode = rpmh_regulator_pmic4_smps_of_map_mode,
+ };
+-- 
+2.30.1
+
diff --git a/queue-5.4/revert-r8152-adjust-the-settings-about-mac-clock-spe.patch b/queue-5.4/revert-r8152-adjust-the-settings-about-mac-clock-spe.patch
new file mode 100644 (file)
index 0000000..0c86165
--- /dev/null
@@ -0,0 +1,111 @@
+From d61b4940c18e69222f524d8ec01fae26a9251612 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 3 Mar 2021 16:39:47 +0800
+Subject: Revert "r8152: adjust the settings about MAC clock speed down for
+ RTL8153"
+
+From: Hayes Wang <hayeswang@realtek.com>
+
+[ Upstream commit 4b5dc1a94d4f92b5845e98bd9ae344b26d933aad ]
+
+This reverts commit 134f98bcf1b898fb9d6f2b91bc85dd2e5478b4b8.
+
+The r8153_mac_clk_spd() is used for RTL8153A only, because the register
+table of RTL8153B is different from RTL8153A. However, this function would
+be called when RTL8153B calls r8153_first_init() and r8153_enter_oob().
+That causes RTL8153B becomes unstable when suspending and resuming. The
+worst case may let the device stop working.
+
+Besides, revert this commit to disable MAC clock speed down for RTL8153A.
+It would avoid the known issue when enabling U1. The data of the first
+control transfer may be wrong when exiting U1.
+
+Signed-off-by: Hayes Wang <hayeswang@realtek.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/net/usb/r8152.c | 35 ++++++-----------------------------
+ 1 file changed, 6 insertions(+), 29 deletions(-)
+
+diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
+index 22f093797f41..486cf511d2bf 100644
+--- a/drivers/net/usb/r8152.c
++++ b/drivers/net/usb/r8152.c
+@@ -2836,29 +2836,6 @@ static void __rtl_set_wol(struct r8152 *tp, u32 wolopts)
+               device_set_wakeup_enable(&tp->udev->dev, false);
+ }
+-static void r8153_mac_clk_spd(struct r8152 *tp, bool enable)
+-{
+-      /* MAC clock speed down */
+-      if (enable) {
+-              ocp_write_word(tp, MCU_TYPE_PLA, PLA_MAC_PWR_CTRL,
+-                             ALDPS_SPDWN_RATIO);
+-              ocp_write_word(tp, MCU_TYPE_PLA, PLA_MAC_PWR_CTRL2,
+-                             EEE_SPDWN_RATIO);
+-              ocp_write_word(tp, MCU_TYPE_PLA, PLA_MAC_PWR_CTRL3,
+-                             PKT_AVAIL_SPDWN_EN | SUSPEND_SPDWN_EN |
+-                             U1U2_SPDWN_EN | L1_SPDWN_EN);
+-              ocp_write_word(tp, MCU_TYPE_PLA, PLA_MAC_PWR_CTRL4,
+-                             PWRSAVE_SPDWN_EN | RXDV_SPDWN_EN | TX10MIDLE_EN |
+-                             TP100_SPDWN_EN | TP500_SPDWN_EN | EEE_SPDWN_EN |
+-                             TP1000_SPDWN_EN);
+-      } else {
+-              ocp_write_word(tp, MCU_TYPE_PLA, PLA_MAC_PWR_CTRL, 0);
+-              ocp_write_word(tp, MCU_TYPE_PLA, PLA_MAC_PWR_CTRL2, 0);
+-              ocp_write_word(tp, MCU_TYPE_PLA, PLA_MAC_PWR_CTRL3, 0);
+-              ocp_write_word(tp, MCU_TYPE_PLA, PLA_MAC_PWR_CTRL4, 0);
+-      }
+-}
+-
+ static void r8153_u1u2en(struct r8152 *tp, bool enable)
+ {
+       u8 u1u2[8];
+@@ -3158,11 +3135,9 @@ static void rtl8153_runtime_enable(struct r8152 *tp, bool enable)
+       if (enable) {
+               r8153_u1u2en(tp, false);
+               r8153_u2p3en(tp, false);
+-              r8153_mac_clk_spd(tp, true);
+               rtl_runtime_suspend_enable(tp, true);
+       } else {
+               rtl_runtime_suspend_enable(tp, false);
+-              r8153_mac_clk_spd(tp, false);
+               switch (tp->version) {
+               case RTL_VER_03:
+@@ -3727,7 +3702,6 @@ static void r8153_first_init(struct r8152 *tp)
+       u32 ocp_data;
+       int i;
+-      r8153_mac_clk_spd(tp, false);
+       rxdy_gated_en(tp, true);
+       r8153_teredo_off(tp);
+@@ -3789,8 +3763,6 @@ static void r8153_enter_oob(struct r8152 *tp)
+       u32 ocp_data;
+       int i;
+-      r8153_mac_clk_spd(tp, true);
+-
+       ocp_data = ocp_read_byte(tp, MCU_TYPE_PLA, PLA_OOB_CTRL);
+       ocp_data &= ~NOW_IS_OOB;
+       ocp_write_byte(tp, MCU_TYPE_PLA, PLA_OOB_CTRL, ocp_data);
+@@ -4498,9 +4470,14 @@ static void r8153_init(struct r8152 *tp)
+       ocp_write_word(tp, MCU_TYPE_USB, USB_CONNECT_TIMER, 0x0001);
++      /* MAC clock speed down */
++      ocp_write_word(tp, MCU_TYPE_PLA, PLA_MAC_PWR_CTRL, 0);
++      ocp_write_word(tp, MCU_TYPE_PLA, PLA_MAC_PWR_CTRL2, 0);
++      ocp_write_word(tp, MCU_TYPE_PLA, PLA_MAC_PWR_CTRL3, 0);
++      ocp_write_word(tp, MCU_TYPE_PLA, PLA_MAC_PWR_CTRL4, 0);
++
+       r8153_power_cut_en(tp, false);
+       r8153_u1u2en(tp, true);
+-      r8153_mac_clk_spd(tp, false);
+       usb_enable_lpm(tp->udev);
+       ocp_data = ocp_read_byte(tp, MCU_TYPE_PLA, PLA_CONFIG6);
+-- 
+2.30.1
+
index efabdb32370acdc3ff79e0e70830a5a4b205ec3c..d09173e4bca367d515231fa68e080865226a485e 100644 (file)
@@ -1 +1,38 @@
 hugetlbfs-hugetlb_fault_mutex_hash-cleanup.patch
+net-fec-ptp-avoid-register-access-when-ipg-clock-is-.patch
+powerpc-4xx-fix-build-errors-from-mfdcr.patch
+atm-eni-dont-release-is-never-initialized.patch
+atm-lanai-dont-run-lanai_dev_close-if-not-open.patch
+revert-r8152-adjust-the-settings-about-mac-clock-spe.patch
+alsa-hda-ignore-invalid-nhlt-table.patch
+ixgbe-fix-memleak-in-ixgbe_configure_clsu32.patch
+net-tehuti-fix-error-return-code-in-bdx_probe.patch
+net-intel-iavf-fix-error-return-code-of-iavf_init_ge.patch
+sun-niu-fix-wrong-rxmac_bc_frm_cnt_count-count.patch
+gianfar-fix-jumbo-packets-napi-rx-overrun-crash.patch
+cifs-ask-for-more-credit-on-async-read-write-code-pa.patch
+cpufreq-blacklist-arm-vexpress-platforms-in-cpufreq-.patch
+gpiolib-acpi-add-missing-irqf_oneshot.patch
+nfs-fix-pnfs_flexfile_layout-kconfig-default.patch
+nfs-correct-size-calculation-for-create-reply-length.patch
+net-hisilicon-hns-fix-error-return-code-of-hns_nic_c.patch
+net-wan-fix-error-return-code-of-uhdlc_init.patch
+net-davicom-use-platform_get_irq_optional.patch
+atm-upd98402-fix-incorrect-allocation.patch
+atm-idt77252-fix-null-ptr-dereference.patch
+cifs-change-noisy-error-message-to-fyi.patch
+irqchip-ingenic-add-support-for-the-jz4760.patch
+sparc64-fix-opcode-filtering-in-handling-of-no-fault.patch
+habanalabs-call-put_pid-when-releasing-control-devic.patch
+u64_stats-lockdep-fix-u64_stats_init-vs-lockdep.patch
+regulator-qcom-rpmh-correct-the-pmic5_hfsmps515-buck.patch
+drm-amd-display-revert-dram_clock_change_latency-for.patch
+drm-amdgpu-fb-bo-should-be-ttm_bo_type_device.patch
+drm-radeon-fix-agp-dependency.patch
+nvme-add-nvme_req_cancelled-flag-in-nvme_cancel_requ.patch
+nvme-fc-return-nvme_sc_host_aborted_cmd-when-a-comma.patch
+nvme-pci-add-the-disable_write_zeroes-quirk-for-a-sa.patch
+nfs-we-don-t-support-removing-system.nfs4_acl.patch
+block-suppress-uevent-for-hidden-device-when-removed.patch
+ia64-fix-ia64_syscall_get_set_arguments-for-break-ba.patch
+ia64-fix-ptrace-ptrace_syscall_info_exit-sign.patch
diff --git a/queue-5.4/sparc64-fix-opcode-filtering-in-handling-of-no-fault.patch b/queue-5.4/sparc64-fix-opcode-filtering-in-handling-of-no-fault.patch
new file mode 100644 (file)
index 0000000..1144f2d
--- /dev/null
@@ -0,0 +1,74 @@
+From 48c1b4f353c25d06a56c12ecb4e34781f2895652 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Sun, 28 Feb 2021 22:48:16 -0700
+Subject: sparc64: Fix opcode filtering in handling of no fault loads
+
+From: Rob Gardner <rob.gardner@oracle.com>
+
+[ Upstream commit e5e8b80d352ec999d2bba3ea584f541c83f4ca3f ]
+
+is_no_fault_exception() has two bugs which were discovered via random
+opcode testing with stress-ng. Both are caused by improper filtering
+of opcodes.
+
+The first bug can be triggered by a floating point store with a no-fault
+ASI, for instance "sta %f0, [%g0] #ASI_PNF", opcode C1A01040.
+
+The code first tests op3[5] (0x1000000), which denotes a floating
+point instruction, and then tests op3[2] (0x200000), which denotes a
+store instruction. But these bits are not mutually exclusive, and the
+above mentioned opcode has both bits set. The intent is to filter out
+stores, so the test for stores must be done first in order to have
+any effect.
+
+The second bug can be triggered by a floating point load with one of
+the invalid ASI values 0x8e or 0x8f, which pass this check in
+is_no_fault_exception():
+     if ((asi & 0xf2) == ASI_PNF)
+
+An example instruction is "ldqa [%l7 + %o7] #ASI 0x8f, %f38",
+opcode CF95D1EF. Asi values greater than 0x8b (ASI_SNFL) are fatal
+in handle_ldf_stq(), and is_no_fault_exception() must not allow these
+invalid asi values to make it that far.
+
+In both of these cases, handle_ldf_stq() reacts by calling
+sun4v_data_access_exception() or spitfire_data_access_exception(),
+which call is_no_fault_exception() and results in an infinite
+recursion.
+
+Signed-off-by: Rob Gardner <rob.gardner@oracle.com>
+Tested-by: Anatoly Pugachev <matorola@gmail.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ arch/sparc/kernel/traps_64.c | 13 ++++++-------
+ 1 file changed, 6 insertions(+), 7 deletions(-)
+
+diff --git a/arch/sparc/kernel/traps_64.c b/arch/sparc/kernel/traps_64.c
+index 27778b65a965..f2b22c496fb9 100644
+--- a/arch/sparc/kernel/traps_64.c
++++ b/arch/sparc/kernel/traps_64.c
+@@ -275,14 +275,13 @@ bool is_no_fault_exception(struct pt_regs *regs)
+                       asi = (regs->tstate >> 24); /* saved %asi       */
+               else
+                       asi = (insn >> 5);          /* immediate asi    */
+-              if ((asi & 0xf2) == ASI_PNF) {
+-                      if (insn & 0x1000000) {     /* op3[5:4]=3       */
+-                              handle_ldf_stq(insn, regs);
+-                              return true;
+-                      } else if (insn & 0x200000) { /* op3[2], stores */
++              if ((asi & 0xf6) == ASI_PNF) {
++                      if (insn & 0x200000)        /* op3[2], stores   */
+                               return false;
+-                      }
+-                      handle_ld_nf(insn, regs);
++                      if (insn & 0x1000000)       /* op3[5:4]=3 (fp)  */
++                              handle_ldf_stq(insn, regs);
++                      else
++                              handle_ld_nf(insn, regs);
+                       return true;
+               }
+       }
+-- 
+2.30.1
+
diff --git a/queue-5.4/sun-niu-fix-wrong-rxmac_bc_frm_cnt_count-count.patch b/queue-5.4/sun-niu-fix-wrong-rxmac_bc_frm_cnt_count-count.patch
new file mode 100644 (file)
index 0000000..659ecc2
--- /dev/null
@@ -0,0 +1,35 @@
+From 969501cbdf4d1d337545347301e61627c49084ad Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 5 Mar 2021 20:02:12 +0300
+Subject: sun/niu: fix wrong RXMAC_BC_FRM_CNT_COUNT count
+
+From: Denis Efremov <efremov@linux.com>
+
+[ Upstream commit 155b23e6e53475ca3b8c2a946299b4d4dd6a5a1e ]
+
+RXMAC_BC_FRM_CNT_COUNT added to mp->rx_bcasts twice in a row
+in niu_xmac_interrupt(). Remove the second addition.
+
+Signed-off-by: Denis Efremov <efremov@linux.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/net/ethernet/sun/niu.c | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/drivers/net/ethernet/sun/niu.c b/drivers/net/ethernet/sun/niu.c
+index f5fd1f3c07cc..2911740af706 100644
+--- a/drivers/net/ethernet/sun/niu.c
++++ b/drivers/net/ethernet/sun/niu.c
+@@ -3931,8 +3931,6 @@ static void niu_xmac_interrupt(struct niu *np)
+               mp->rx_mcasts += RXMAC_MC_FRM_CNT_COUNT;
+       if (val & XRXMAC_STATUS_RXBCAST_CNT_EXP)
+               mp->rx_bcasts += RXMAC_BC_FRM_CNT_COUNT;
+-      if (val & XRXMAC_STATUS_RXBCAST_CNT_EXP)
+-              mp->rx_bcasts += RXMAC_BC_FRM_CNT_COUNT;
+       if (val & XRXMAC_STATUS_RXHIST1_CNT_EXP)
+               mp->rx_hist_cnt1 += RXMAC_HIST_CNT1_COUNT;
+       if (val & XRXMAC_STATUS_RXHIST2_CNT_EXP)
+-- 
+2.30.1
+
diff --git a/queue-5.4/u64_stats-lockdep-fix-u64_stats_init-vs-lockdep.patch b/queue-5.4/u64_stats-lockdep-fix-u64_stats_init-vs-lockdep.patch
new file mode 100644 (file)
index 0000000..85166b6
--- /dev/null
@@ -0,0 +1,64 @@
+From 5b54fdcf5bad195039530d0f1c50b4b24a5027ca Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Mon, 8 Mar 2021 09:38:12 +0100
+Subject: u64_stats,lockdep: Fix u64_stats_init() vs lockdep
+
+From: Peter Zijlstra <peterz@infradead.org>
+
+[ Upstream commit d5b0e0677bfd5efd17c5bbb00156931f0d41cb85 ]
+
+Jakub reported that:
+
+    static struct net_device *rtl8139_init_board(struct pci_dev *pdev)
+    {
+           ...
+           u64_stats_init(&tp->rx_stats.syncp);
+           u64_stats_init(&tp->tx_stats.syncp);
+           ...
+    }
+
+results in lockdep getting confused between the RX and TX stats lock.
+This is because u64_stats_init() is an inline calling seqcount_init(),
+which is a macro using a static variable to generate a lockdep class.
+
+By wrapping that in an inline, we negate the effect of the macro and
+fold the static key variable, hence the confusion.
+
+Fix by also making u64_stats_init() a macro for the case where it
+matters, leaving the other case an inline for argument validation
+etc.
+
+Reported-by: Jakub Kicinski <kuba@kernel.org>
+Debugged-by: "Ahmed S. Darwish" <a.darwish@linutronix.de>
+Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
+Tested-by: "Erhard F." <erhard_f@mailbox.org>
+Link: https://lkml.kernel.org/r/YEXicy6+9MksdLZh@hirez.programming.kicks-ass.net
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ include/linux/u64_stats_sync.h | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/include/linux/u64_stats_sync.h b/include/linux/u64_stats_sync.h
+index a27604f99ed0..11096b561dab 100644
+--- a/include/linux/u64_stats_sync.h
++++ b/include/linux/u64_stats_sync.h
+@@ -69,12 +69,13 @@ struct u64_stats_sync {
+ };
++#if BITS_PER_LONG == 32 && defined(CONFIG_SMP)
++#define u64_stats_init(syncp) seqcount_init(&(syncp)->seq)
++#else
+ static inline void u64_stats_init(struct u64_stats_sync *syncp)
+ {
+-#if BITS_PER_LONG == 32 && defined(CONFIG_SMP)
+-      seqcount_init(&syncp->seq);
+-#endif
+ }
++#endif
+ static inline void u64_stats_update_begin(struct u64_stats_sync *syncp)
+ {
+-- 
+2.30.1
+