From: Sasha Levin Date: Wed, 24 Feb 2021 12:43:25 +0000 (-0500) Subject: Fixes for 5.10 X-Git-Tag: v5.11.2~1^2~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d87d0815ce584e7035b0b853144926c591fc37dd;p=thirdparty%2Fkernel%2Fstable-queue.git Fixes for 5.10 Signed-off-by: Sasha Levin --- diff --git a/queue-5.10/cifs-set-cifs_mount_use_prefix_path-flag-on-setting-.patch b/queue-5.10/cifs-set-cifs_mount_use_prefix_path-flag-on-setting-.patch new file mode 100644 index 00000000000..7cd89bf1b93 --- /dev/null +++ b/queue-5.10/cifs-set-cifs_mount_use_prefix_path-flag-on-setting-.patch @@ -0,0 +1,45 @@ +From e0770982cc122576fdcb0890b434bf353a06ce0a Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Thu, 11 Feb 2021 03:26:54 -0800 +Subject: cifs: Set CIFS_MOUNT_USE_PREFIX_PATH flag on setting + cifs_sb->prepath. + +From: Shyam Prasad N + +[ Upstream commit a738c93fb1c17e386a09304b517b1c6b2a6a5a8b ] + +While debugging another issue today, Steve and I noticed that if a +subdir for a file share is already mounted on the client, any new +mount of any other subdir (or the file share root) of the same share +results in sharing the cifs superblock, which e.g. can result in +incorrect device name. + +While setting prefix path for the root of a cifs_sb, +CIFS_MOUNT_USE_PREFIX_PATH flag should also be set. +Without it, prepath is not even considered in some places, +and output of "mount" and various /proc/<>/*mount* related +options can be missing part of the device name. + +Signed-off-by: Shyam Prasad N +Reviewed-by: Aurelien Aptel +Signed-off-by: Steve French +Signed-off-by: Sasha Levin +--- + fs/cifs/connect.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c +index 44f9cce570995..ad3ecda1314d9 100644 +--- a/fs/cifs/connect.c ++++ b/fs/cifs/connect.c +@@ -4007,6 +4007,7 @@ int cifs_setup_cifs_sb(struct smb_vol *pvolume_info, + cifs_sb->prepath = kstrdup(pvolume_info->prepath, GFP_KERNEL); + if (cifs_sb->prepath == NULL) + return -ENOMEM; ++ cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_USE_PREFIX_PATH; + } + + return 0; +-- +2.27.0 + diff --git a/queue-5.10/cxgb4-add-new-t6-pci-device-id-0x6092.patch b/queue-5.10/cxgb4-add-new-t6-pci-device-id-0x6092.patch new file mode 100644 index 00000000000..c5680a35202 --- /dev/null +++ b/queue-5.10/cxgb4-add-new-t6-pci-device-id-0x6092.patch @@ -0,0 +1,32 @@ +From e956e1df98b2ece9ca3d7d953191eb0e007e77c0 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 2 Feb 2021 23:55:11 +0530 +Subject: cxgb4: Add new T6 PCI device id 0x6092 + +From: Raju Rangoju + +[ Upstream commit 3401e4aa43a540881cc97190afead650e709c418 ] + +Signed-off-by: Raju Rangoju +Link: https://lore.kernel.org/r/20210202182511.8109-1-rajur@chelsio.com +Signed-off-by: Jakub Kicinski +Signed-off-by: Sasha Levin +--- + drivers/net/ethernet/chelsio/cxgb4/t4_pci_id_tbl.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/drivers/net/ethernet/chelsio/cxgb4/t4_pci_id_tbl.h b/drivers/net/ethernet/chelsio/cxgb4/t4_pci_id_tbl.h +index 0c5373462cedb..0b1b5f9c67d47 100644 +--- a/drivers/net/ethernet/chelsio/cxgb4/t4_pci_id_tbl.h ++++ b/drivers/net/ethernet/chelsio/cxgb4/t4_pci_id_tbl.h +@@ -219,6 +219,7 @@ CH_PCI_DEVICE_ID_TABLE_DEFINE_BEGIN + CH_PCI_ID_TABLE_FENTRY(0x6089), /* Custom T62100-KR */ + CH_PCI_ID_TABLE_FENTRY(0x608a), /* Custom T62100-CR */ + CH_PCI_ID_TABLE_FENTRY(0x608b), /* Custom T6225-CR */ ++ CH_PCI_ID_TABLE_FENTRY(0x6092), /* Custom T62100-CR-LOM */ + CH_PCI_DEVICE_ID_TABLE_DEFINE_END; + + #endif /* __T4_PCI_ID_TBL_H__ */ +-- +2.27.0 + diff --git a/queue-5.10/drm-xlnx-fix-kmemleak-by-sending-vblank_event-in-ato.patch b/queue-5.10/drm-xlnx-fix-kmemleak-by-sending-vblank_event-in-ato.patch new file mode 100644 index 00000000000..5d09699c24c --- /dev/null +++ b/queue-5.10/drm-xlnx-fix-kmemleak-by-sending-vblank_event-in-ato.patch @@ -0,0 +1,110 @@ +From fa30f0d3287688a22adb6174de69bf41217a36dc Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 2 Feb 2021 14:41:21 +0800 +Subject: drm/xlnx: fix kmemleak by sending vblank_event in atomic_disable + +From: Quanyang Wang + +[ Upstream commit a7e02f7796c163ac8297b30223bf24bade9f8a50 ] + +When running xrandr to change resolution of DP, the kmemleak as below +can be observed: + +unreferenced object 0xffff00080a351000 (size 256): + comm "Xorg", pid 248, jiffies 4294899614 (age 19.960s) + hex dump (first 32 bytes): + 98 a0 bc 01 08 00 ff ff 01 00 00 00 00 00 00 00 ................ + ff ff ff ff 00 00 00 00 00 00 00 00 00 00 00 00 ................ + backtrace: + [<00000000e0bd0f69>] kmemleak_alloc+0x30/0x40 + [<00000000cde2f318>] kmem_cache_alloc+0x3d4/0x588 + [<0000000088ea9bd7>] drm_atomic_helper_setup_commit+0x84/0x5f8 + [<000000002290a264>] drm_atomic_helper_commit+0x58/0x388 + [<00000000f6ea78c3>] drm_atomic_commit+0x4c/0x60 + [<00000000c8e0725e>] drm_atomic_connector_commit_dpms+0xe8/0x110 + [<0000000020ade187>] drm_mode_obj_set_property_ioctl+0x1b0/0x450 + [<00000000918206d6>] drm_connector_property_set_ioctl+0x3c/0x68 + [<000000008d51e7a5>] drm_ioctl_kernel+0xc4/0x118 + [<000000002a819b75>] drm_ioctl+0x214/0x448 + [<000000008ca4e588>] __arm64_sys_ioctl+0xa8/0xf0 + [<0000000034e15a35>] el0_svc_common.constprop.0+0x74/0x190 + [<000000001b93d916>] do_el0_svc+0x24/0x90 + [<00000000ce9230e0>] el0_svc+0x14/0x20 + [<00000000e3607d82>] el0_sync_handler+0xb0/0xb8 + [<000000003e79c15f>] el0_sync+0x174/0x180 + +This is because there is a scenario that a drm_crtc_commit commit is +allocated but not freed. The drm subsystem require/release references +to a CRTC commit by calling drm_crtc_commit_get/put, and when +drm_crtc_commit_put find that commit.ref.refcount is zero, it will +call __drm_crtc_commit_free to free this CRTC commit. Among these +drm_crtc_commit_get/put pairs, there is a drm_crtc_commit_get in +drm_atomic_helper_setup_commit as below: + +... +new_crtc_state->event->base.completion = &commit->flip_done; +new_crtc_state->event->base.completion_release = release_crtc_commit; +drm_crtc_commit_get(commit); +... + +This reference to the CRTC commit should be released at the function +release_crtc_commit by calling e->completion_release(e->completion) in +drm_send_event_locked. So we need to call drm_send_event_locked at +two places: handling vblank event in the irq handler and the crtc disable +helper. But in zynqmp_disp_crtc_atomic_disable, it only marks the flip +is done and not call drm_crtc_commit_put. This result that the refcount +of this commit is always non-zero and this commit will never be freed. + +Since the function drm_crtc_send_vblank_event has operations both sending +a flip_done signal and releasing reference to the CRTC commit, let's use +it instead. + +Signed-off-by: Quanyang Wang +Signed-off-by: Daniel Vetter +Link: https://patchwork.freedesktop.org/patch/msgid/20210202064121.173362-1-quanyang.wang@windriver.com +Signed-off-by: Sasha Levin +--- + drivers/gpu/drm/xlnx/zynqmp_disp.c | 15 +++++++-------- + 1 file changed, 7 insertions(+), 8 deletions(-) + +diff --git a/drivers/gpu/drm/xlnx/zynqmp_disp.c b/drivers/gpu/drm/xlnx/zynqmp_disp.c +index 98bd48f13fd11..8cd8af35cfaac 100644 +--- a/drivers/gpu/drm/xlnx/zynqmp_disp.c ++++ b/drivers/gpu/drm/xlnx/zynqmp_disp.c +@@ -1398,19 +1398,11 @@ static void zynqmp_disp_enable(struct zynqmp_disp *disp) + */ + static void zynqmp_disp_disable(struct zynqmp_disp *disp) + { +- struct drm_crtc *crtc = &disp->crtc; +- + zynqmp_disp_audio_disable(&disp->audio); + + zynqmp_disp_avbuf_disable_audio(&disp->avbuf); + zynqmp_disp_avbuf_disable_channels(&disp->avbuf); + zynqmp_disp_avbuf_disable(&disp->avbuf); +- +- /* Mark the flip is done as crtc is disabled anyway */ +- if (crtc->state->event) { +- complete_all(crtc->state->event->base.completion); +- crtc->state->event = NULL; +- } + } + + static inline struct zynqmp_disp *crtc_to_disp(struct drm_crtc *crtc) +@@ -1499,6 +1491,13 @@ zynqmp_disp_crtc_atomic_disable(struct drm_crtc *crtc, + + drm_crtc_vblank_off(&disp->crtc); + ++ spin_lock_irq(&crtc->dev->event_lock); ++ if (crtc->state->event) { ++ drm_crtc_send_vblank_event(crtc, crtc->state->event); ++ crtc->state->event = NULL; ++ } ++ spin_unlock_irq(&crtc->dev->event_lock); ++ + clk_disable_unprepare(disp->pclk); + pm_runtime_put_sync(disp->dev); + } +-- +2.27.0 + diff --git a/queue-5.10/kbuild-fix-config_trim_unused_ksyms-build-for-ppc64.patch b/queue-5.10/kbuild-fix-config_trim_unused_ksyms-build-for-ppc64.patch new file mode 100644 index 00000000000..c5078cf277d --- /dev/null +++ b/queue-5.10/kbuild-fix-config_trim_unused_ksyms-build-for-ppc64.patch @@ -0,0 +1,53 @@ +From b9165e54938d31cf0d8c5b5b380314ea3400ef60 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Thu, 11 Feb 2021 15:14:16 +0900 +Subject: kbuild: fix CONFIG_TRIM_UNUSED_KSYMS build for ppc64 + +From: Masahiro Yamada + +[ Upstream commit 29500f15b54b63ad0ea60b58e85144262bd24df2 ] + +Stephen Rothwell reported a build error on ppc64 when +CONFIG_TRIM_UNUSED_KSYMS is enabled. + +Jessica Yu pointed out the cause of the error with the reference to the +ppc64 ELF ABI: + "Symbol names with a dot (.) prefix are reserved for holding entry + point addresses. The value of a symbol named ".FN", if it exists, + is the entry point of the function "FN". + +As it turned out, CONFIG_TRIM_UNUSED_KSYMS has never worked for ppc64, +but this issue has been unnoticed until recently because this option +depends on !UNUSED_SYMBOLS hence is disabled by all{mod,yes}config. +(Then, it was uncovered by another patch removing UNUSED_SYMBOLS.) + +Removing the dot prefix in scripts/gen_autoksyms.sh fixes the issue. +Please note it must be done before 'sort -u' because modules have +both ._mcount and _mcount undefined when CONFIG_FUNCTION_TRACER=y. + +Link: https://lore.kernel.org/lkml/20210209210843.3af66662@canb.auug.org.au/ +Reported-by: Stephen Rothwell +Signed-off-by: Masahiro Yamada +Tested-by: Jessica Yu +Signed-off-by: Sasha Levin +--- + scripts/gen_autoksyms.sh | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/scripts/gen_autoksyms.sh b/scripts/gen_autoksyms.sh +index 16c0b2ddaa4c9..d54dfba15bf25 100755 +--- a/scripts/gen_autoksyms.sh ++++ b/scripts/gen_autoksyms.sh +@@ -43,6 +43,9 @@ EOT + sed 's/ko$/mod/' $modlist | + xargs -n1 sed -n -e '2{s/ /\n/g;/^$/!p;}' -- | + cat - "$ksym_wl" | ++# Remove the dot prefix for ppc64; symbol names with a dot (.) hold entry ++# point addresses. ++sed -e 's/^\.//' | + sort -u | + sed -e 's/\(.*\)/#define __KSYM_\1 1/' >> "$output_file" + +-- +2.27.0 + diff --git a/queue-5.10/net-usb-qmi_wwan-adding-support-for-cinterion-mv31.patch b/queue-5.10/net-usb-qmi_wwan-adding-support-for-cinterion-mv31.patch new file mode 100644 index 00000000000..2edd4090aa4 --- /dev/null +++ b/queue-5.10/net-usb-qmi_wwan-adding-support-for-cinterion-mv31.patch @@ -0,0 +1,46 @@ +From 60e1d5f135eb4a6caacd77c172d5ec5135c794e5 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 2 Feb 2021 09:45:23 +0100 +Subject: NET: usb: qmi_wwan: Adding support for Cinterion MV31 + +From: Christoph Schemmel + +[ Upstream commit a4dc7eee9106a9d2a6e08b442db19677aa9699c7 ] + +Adding support for Cinterion MV31 with PID 0x00B7. + +T: Bus=04 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 11 Spd=5000 MxCh= 0 +D: Ver= 3.20 Cls=ef(misc ) Sub=02 Prot=01 MxPS= 9 #Cfgs= 1 +P: Vendor=1e2d ProdID=00b7 Rev=04.14 +S: Manufacturer=Cinterion +S: Product=Cinterion USB Mobile Broadband +S: SerialNumber=b3246eed +C: #Ifs= 4 Cfg#= 1 Atr=a0 MxPwr=896mA +I: If#=0x0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan +I: If#=0x1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option +I: If#=0x2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option +I: If#=0x3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=option + +Signed-off-by: Christoph Schemmel +Link: https://lore.kernel.org/r/20210202084523.4371-1-christoph.schemmel@gmail.com +Signed-off-by: Jakub Kicinski +Signed-off-by: Sasha Levin +--- + drivers/net/usb/qmi_wwan.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c +index ce73df4c137ea..b223536e07bed 100644 +--- a/drivers/net/usb/qmi_wwan.c ++++ b/drivers/net/usb/qmi_wwan.c +@@ -1332,6 +1332,7 @@ static const struct usb_device_id products[] = { + {QMI_FIXED_INTF(0x1e2d, 0x0082, 5)}, /* Cinterion PHxx,PXxx (2 RmNet) */ + {QMI_FIXED_INTF(0x1e2d, 0x0083, 4)}, /* Cinterion PHxx,PXxx (1 RmNet + USB Audio)*/ + {QMI_QUIRK_SET_DTR(0x1e2d, 0x00b0, 4)}, /* Cinterion CLS8 */ ++ {QMI_FIXED_INTF(0x1e2d, 0x00b7, 0)}, /* Cinterion MV31 RmNet */ + {QMI_FIXED_INTF(0x413c, 0x81a2, 8)}, /* Dell Wireless 5806 Gobi(TM) 4G LTE Mobile Broadband Card */ + {QMI_FIXED_INTF(0x413c, 0x81a3, 8)}, /* Dell Wireless 5570 HSPA+ (42Mbps) Mobile Broadband Card */ + {QMI_FIXED_INTF(0x413c, 0x81a4, 8)}, /* Dell Wireless 5570e HSPA+ (42Mbps) Mobile Broadband Card */ +-- +2.27.0 + diff --git a/queue-5.10/scripts-recordmcount.pl-support-big-endian-for-arch-.patch b/queue-5.10/scripts-recordmcount.pl-support-big-endian-for-arch-.patch new file mode 100644 index 00000000000..613a5885363 --- /dev/null +++ b/queue-5.10/scripts-recordmcount.pl-support-big-endian-for-arch-.patch @@ -0,0 +1,55 @@ +From 9753b346369f9c78f8b3201cc67379fe2df6bda9 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Fri, 12 Feb 2021 20:52:41 -0800 +Subject: scripts/recordmcount.pl: support big endian for ARCH sh + +From: Rong Chen + +[ Upstream commit 93ca696376dd3d44b9e5eae835ffbc84772023ec ] + +The kernel test robot reported the following issue: + + CC [M] drivers/soc/litex/litex_soc_ctrl.o + sh4-linux-objcopy: Unable to change endianness of input file(s) + sh4-linux-ld: cannot find drivers/soc/litex/.tmp_gl_litex_soc_ctrl.o: No such file or directory + sh4-linux-objcopy: 'drivers/soc/litex/.tmp_mx_litex_soc_ctrl.o': No such file + +The problem is that the format of input file is elf32-shbig-linux, but +sh4-linux-objcopy wants to output a file which format is elf32-sh-linux: + + $ sh4-linux-objdump -d drivers/soc/litex/litex_soc_ctrl.o | grep format + drivers/soc/litex/litex_soc_ctrl.o: file format elf32-shbig-linux + +Link: https://lkml.kernel.org/r/20210210150435.2171567-1-rong.a.chen@intel.com +Link: https://lore.kernel.org/linux-mm/202101261118.GbbYSlHu-lkp@intel.com +Signed-off-by: Rong Chen +Reported-by: kernel test robot +Cc: Yoshinori Sato +Cc: Rich Felker +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Sasha Levin +--- + scripts/recordmcount.pl | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/scripts/recordmcount.pl b/scripts/recordmcount.pl +index 3f77a5d695c13..0bafed857e171 100755 +--- a/scripts/recordmcount.pl ++++ b/scripts/recordmcount.pl +@@ -268,7 +268,11 @@ if ($arch eq "x86_64") { + + # force flags for this arch + $ld .= " -m shlelf_linux"; +- $objcopy .= " -O elf32-sh-linux"; ++ if ($endian eq "big") { ++ $objcopy .= " -O elf32-shbig-linux"; ++ } else { ++ $objcopy .= " -O elf32-sh-linux"; ++ } + + } elsif ($arch eq "powerpc") { + my $ldemulation; +-- +2.27.0 + diff --git a/queue-5.10/series b/queue-5.10/series index d4469c09567..52cbabb3cd3 100644 --- a/queue-5.10/series +++ b/queue-5.10/series @@ -4,3 +4,9 @@ rdma-lift-ibdev_to_node-from-rds-to-common-code.patch nvme-rdma-use-ibdev_to_node-instead-of-dereferencing-dma_device.patch usb-quirks-sort-quirk-entries.patch usb-quirks-add-quirk-to-start-video-capture-on-elmo-l-12f-document-camera-reliable.patch +drm-xlnx-fix-kmemleak-by-sending-vblank_event-in-ato.patch +net-usb-qmi_wwan-adding-support-for-cinterion-mv31.patch +cxgb4-add-new-t6-pci-device-id-0x6092.patch +cifs-set-cifs_mount_use_prefix_path-flag-on-setting-.patch +kbuild-fix-config_trim_unused_ksyms-build-for-ppc64.patch +scripts-recordmcount.pl-support-big-endian-for-arch-.patch