From: Greg Kroah-Hartman Date: Tue, 23 Aug 2022 07:12:53 +0000 (+0200) Subject: 5.15-stable patches X-Git-Tag: v4.9.326~18 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=914acc91569eed1e85731d3cd2bc375a4c4c0d28;p=thirdparty%2Fkernel%2Fstable-queue.git 5.15-stable patches added patches: can-j1939-j1939_sk_queue_activate_next_locked-replace-warn_on_once-with-netdev_warn_once.patch scsi-ufs-ufs-mediatek-fix-build-error-and-type-mismatch.patch --- diff --git a/queue-5.15/can-j1939-j1939_sk_queue_activate_next_locked-replace-warn_on_once-with-netdev_warn_once.patch b/queue-5.15/can-j1939-j1939_sk_queue_activate_next_locked-replace-warn_on_once-with-netdev_warn_once.patch new file mode 100644 index 00000000000..99306439e87 --- /dev/null +++ b/queue-5.15/can-j1939-j1939_sk_queue_activate_next_locked-replace-warn_on_once-with-netdev_warn_once.patch @@ -0,0 +1,43 @@ +From 8ef49f7f8244424adcf4a546dba4cbbeb0b09c09 Mon Sep 17 00:00:00 2001 +From: Fedor Pchelkin +Date: Fri, 29 Jul 2022 17:36:55 +0300 +Subject: can: j1939: j1939_sk_queue_activate_next_locked(): replace WARN_ON_ONCE with netdev_warn_once() + +From: Fedor Pchelkin + +commit 8ef49f7f8244424adcf4a546dba4cbbeb0b09c09 upstream. + +We should warn user-space that it is doing something wrong when trying +to activate sessions with identical parameters but WARN_ON_ONCE macro +can not be used here as it serves a different purpose. + +So it would be good to replace it with netdev_warn_once() message. + +Found by Linux Verification Center (linuxtesting.org) with Syzkaller. + +Fixes: 9d71dd0c7009 ("can: add support of SAE J1939 protocol") +Signed-off-by: Fedor Pchelkin +Signed-off-by: Alexey Khoroshilov +Acked-by: Oleksij Rempel +Link: https://lore.kernel.org/all/20220729143655.1108297-1-pchelkin@ispras.ru +[mkl: fix indention] +Signed-off-by: Marc Kleine-Budde +Signed-off-by: Greg Kroah-Hartman +--- + net/can/j1939/socket.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +--- a/net/can/j1939/socket.c ++++ b/net/can/j1939/socket.c +@@ -178,7 +178,10 @@ activate_next: + if (!first) + return; + +- if (WARN_ON_ONCE(j1939_session_activate(first))) { ++ if (j1939_session_activate(first)) { ++ netdev_warn_once(first->priv->ndev, ++ "%s: 0x%p: Identical session is already activated.\n", ++ __func__, first); + first->err = -EBUSY; + goto activate_next; + } else { diff --git a/queue-5.15/scsi-ufs-ufs-mediatek-fix-build-error-and-type-mismatch.patch b/queue-5.15/scsi-ufs-ufs-mediatek-fix-build-error-and-type-mismatch.patch new file mode 100644 index 00000000000..d6ab9780a84 --- /dev/null +++ b/queue-5.15/scsi-ufs-ufs-mediatek-fix-build-error-and-type-mismatch.patch @@ -0,0 +1,67 @@ +From f54912b228a8df6c0133e31bc75628677bb8c6e5 Mon Sep 17 00:00:00 2001 +From: Ren Zhijie +Date: Sun, 19 Jun 2022 19:54:32 +0800 +Subject: scsi: ufs: ufs-mediatek: Fix build error and type mismatch +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Ren Zhijie + +commit f54912b228a8df6c0133e31bc75628677bb8c6e5 upstream. + +If CONFIG_PM_SLEEP is not set. + +make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu-, will fail: + +drivers/ufs/host/ufs-mediatek.c: In function ‘ufs_mtk_vreg_fix_vcc’: +drivers/ufs/host/ufs-mediatek.c:688:46: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 4 has type ‘long unsigned int’ [-Wformat=] + snprintf(vcc_name, MAX_VCC_NAME, "vcc-opt%u", res.a1); + ~^ ~~~~~~ + %lu +drivers/ufs/host/ufs-mediatek.c: In function ‘ufs_mtk_system_suspend’: +drivers/ufs/host/ufs-mediatek.c:1371:8: error: implicit declaration of function ‘ufshcd_system_suspend’; did you mean ‘ufs_mtk_system_suspend’? [-Werror=implicit-function-declaration] + ret = ufshcd_system_suspend(dev); + ^~~~~~~~~~~~~~~~~~~~~ + ufs_mtk_system_suspend +drivers/ufs/host/ufs-mediatek.c: In function ‘ufs_mtk_system_resume’: +drivers/ufs/host/ufs-mediatek.c:1386:9: error: implicit declaration of function ‘ufshcd_system_resume’; did you mean ‘ufs_mtk_system_resume’? [-Werror=implicit-function-declaration] + return ufshcd_system_resume(dev); + ^~~~~~~~~~~~~~~~~~~~ + ufs_mtk_system_resume +cc1: some warnings being treated as errors + +The declaration of func "ufshcd_system_suspend()" depends on +CONFIG_PM_SLEEP, so the function wrapper ufs_mtk_system_suspend() should +wrapped by CONFIG_PM_SLEEP too. + +Link: https://lore.kernel.org/r/20220619115432.205504-1-renzhijie2@huawei.com +Fixes: 3fd23b8dfb54 ("scsi: ufs: ufs-mediatek: Fix the timing of configuring device regulators") +Reported-by: Hulk Robot +Reviewed-by: Stanley Chu +Signed-off-by: Ren Zhijie +Signed-off-by: Martin K. Petersen +[only take the suspend/resume portion of the commit - gregkh] +Signed-off-by: Greg Kroah-Hartman +--- + drivers/scsi/ufs/ufs-mediatek.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/drivers/scsi/ufs/ufs-mediatek.c ++++ b/drivers/scsi/ufs/ufs-mediatek.c +@@ -1139,6 +1139,7 @@ static int ufs_mtk_remove(struct platfor + return 0; + } + ++#ifdef CONFIG_PM_SLEEP + int ufs_mtk_system_suspend(struct device *dev) + { + struct ufs_hba *hba = dev_get_drvdata(dev); +@@ -1161,6 +1162,7 @@ int ufs_mtk_system_resume(struct device + + return ufshcd_system_resume(dev); + } ++#endif + + int ufs_mtk_runtime_suspend(struct device *dev) + { diff --git a/queue-5.15/series b/queue-5.15/series index 27e0cc49bb0..45b379b27ac 100644 --- a/queue-5.15/series +++ b/queue-5.15/series @@ -231,3 +231,5 @@ powerpc-64-init-jump-labels-before-parse_early_param.patch venus-pm_helpers-fix-warning-in-opp-during-probe.patch video-fbdev-i740fb-check-the-argument-of-i740_calc_v.patch mips-tlbex-explicitly-compare-_page_no_exec-against-.patch +can-j1939-j1939_sk_queue_activate_next_locked-replace-warn_on_once-with-netdev_warn_once.patch +scsi-ufs-ufs-mediatek-fix-build-error-and-type-mismatch.patch