From: Sasha Levin Date: Wed, 16 Nov 2022 12:53:29 +0000 (-0500) Subject: Fixes for 4.14 X-Git-Tag: v4.19.266~55 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cebc4499f041426229563592936459b1aef081dd;p=thirdparty%2Fkernel%2Fstable-queue.git Fixes for 4.14 Signed-off-by: Sasha Levin --- diff --git a/queue-4.14/bluetooth-l2cap-fix-l2cap_global_chan_by_psm.patch b/queue-4.14/bluetooth-l2cap-fix-l2cap_global_chan_by_psm.patch new file mode 100644 index 00000000000..3a2f999fda5 --- /dev/null +++ b/queue-4.14/bluetooth-l2cap-fix-l2cap_global_chan_by_psm.patch @@ -0,0 +1,35 @@ +From 98da72a90ce13cbc9758a44899f5db7d7279489b Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Mon, 31 Oct 2022 16:10:33 -0700 +Subject: Bluetooth: L2CAP: Fix l2cap_global_chan_by_psm + +From: Luiz Augusto von Dentz + +[ Upstream commit f937b758a188d6fd328a81367087eddbb2fce50f ] + +l2cap_global_chan_by_psm shall not return fixed channels as they are not +meant to be connected by (S)PSM. + +Signed-off-by: Luiz Augusto von Dentz +Reviewed-by: Tedd Ho-Jeong An +Signed-off-by: Sasha Levin +--- + net/bluetooth/l2cap_core.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c +index 60bf8603ddc9..8b5b232294b5 100644 +--- a/net/bluetooth/l2cap_core.c ++++ b/net/bluetooth/l2cap_core.c +@@ -1824,7 +1824,7 @@ static struct l2cap_chan *l2cap_global_chan_by_psm(int state, __le16 psm, + if (link_type == LE_LINK && c->src_type == BDADDR_BREDR) + continue; + +- if (c->psm == psm) { ++ if (c->chan_type != L2CAP_CHAN_FIXED && c->psm == psm) { + int src_match, dst_match; + int src_any, dst_any; + +-- +2.35.1 + diff --git a/queue-4.14/drm-imx-imx-tve-fix-return-type-of-imx_tve_connector.patch b/queue-4.14/drm-imx-imx-tve-fix-return-type-of-imx_tve_connector.patch new file mode 100644 index 00000000000..812e4b5108c --- /dev/null +++ b/queue-4.14/drm-imx-imx-tve-fix-return-type-of-imx_tve_connector.patch @@ -0,0 +1,53 @@ +From 0e80aaea0c7d9d9311853a7982f327f56a5910d0 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 13 Sep 2022 13:55:44 -0700 +Subject: drm/imx: imx-tve: Fix return type of imx_tve_connector_mode_valid + +From: Nathan Huckleberry + +[ Upstream commit fc007fb815ab5395c3962c09b79a1630b0fbed9c ] + +The mode_valid field in drm_connector_helper_funcs is expected to be of +type: +enum drm_mode_status (* mode_valid) (struct drm_connector *connector, + struct drm_display_mode *mode); + +The mismatched return type breaks forward edge kCFI since the underlying +function definition does not match the function hook definition. + +The return type of imx_tve_connector_mode_valid should be changed from +int to enum drm_mode_status. + +Reported-by: Dan Carpenter +Link: https://github.com/ClangBuiltLinux/linux/issues/1703 +Cc: llvm@lists.linux.dev +Signed-off-by: Nathan Huckleberry +Reviewed-by: Nathan Chancellor +Reviewed-by: Fabio Estevam +Reviewed-by: Philipp Zabel +Signed-off-by: Philipp Zabel +Link: https://patchwork.freedesktop.org/patch/msgid/20220913205544.155106-1-nhuck@google.com +Signed-off-by: Sasha Levin +--- + drivers/gpu/drm/imx/imx-tve.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/drivers/gpu/drm/imx/imx-tve.c b/drivers/gpu/drm/imx/imx-tve.c +index c22c3e6e9b7a..c4d67fc54c0b 100644 +--- a/drivers/gpu/drm/imx/imx-tve.c ++++ b/drivers/gpu/drm/imx/imx-tve.c +@@ -243,8 +243,9 @@ static int imx_tve_connector_get_modes(struct drm_connector *connector) + return ret; + } + +-static int imx_tve_connector_mode_valid(struct drm_connector *connector, +- struct drm_display_mode *mode) ++static enum drm_mode_status ++imx_tve_connector_mode_valid(struct drm_connector *connector, ++ struct drm_display_mode *mode) + { + struct imx_tve *tve = con_to_tve(connector); + unsigned long rate; +-- +2.35.1 + diff --git a/queue-4.14/rtc-cmos-fix-build-on-non-acpi-platforms.patch b/queue-4.14/rtc-cmos-fix-build-on-non-acpi-platforms.patch new file mode 100644 index 00000000000..096fc83be7f --- /dev/null +++ b/queue-4.14/rtc-cmos-fix-build-on-non-acpi-platforms.patch @@ -0,0 +1,37 @@ +From c2a6482928f8f2474e87b09b369a99a2c1447eea Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 18 Oct 2022 22:35:11 +0200 +Subject: rtc: cmos: fix build on non-ACPI platforms + +From: Alexandre Belloni + +[ Upstream commit db4e955ae333567dea02822624106c0b96a2f84f ] + +Now that rtc_wake_setup is called outside of cmos_wake_setup, it also need +to be defined on non-ACPI platforms. + +Reported-by: kernel test robot +Link: https://lore.kernel.org/r/20221018203512.2532407-1-alexandre.belloni@bootlin.com +Signed-off-by: Alexandre Belloni +Signed-off-by: Sasha Levin +--- + drivers/rtc/rtc-cmos.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c +index 5e2ee430b3f8..655caf2cf1e6 100644 +--- a/drivers/rtc/rtc-cmos.c ++++ b/drivers/rtc/rtc-cmos.c +@@ -1189,6 +1189,9 @@ static void cmos_check_acpi_rtc_status(struct device *dev, + { + } + ++static void rtc_wake_setup(struct device *dev) ++{ ++} + #endif + + #ifdef CONFIG_PNP +-- +2.35.1 + diff --git a/queue-4.14/selftests-futex-fix-build-for-clang.patch b/queue-4.14/selftests-futex-fix-build-for-clang.patch new file mode 100644 index 00000000000..7424c2fbcfe --- /dev/null +++ b/queue-4.14/selftests-futex-fix-build-for-clang.patch @@ -0,0 +1,54 @@ +From 7ba2a8ac8da4f2ef337c30f2527a083880c13490 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Mon, 10 Oct 2022 08:37:02 +0200 +Subject: selftests/futex: fix build for clang +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Ricardo Cañuelo + +[ Upstream commit 03cab65a07e083b6c1010fbc8f9b817e9aca75d9 ] + +Don't use the test-specific header files as source files to force a +target dependency, as clang will complain if more than one source file +is used for a compile command with a single '-o' flag. + +Use the proper Makefile variables instead as defined in +tools/testing/selftests/lib.mk. + +Signed-off-by: Ricardo Cañuelo +Reviewed-by: André Almeida +Signed-off-by: Shuah Khan +Signed-off-by: Sasha Levin +--- + tools/testing/selftests/futex/functional/Makefile | 6 ++---- + 1 file changed, 2 insertions(+), 4 deletions(-) + +diff --git a/tools/testing/selftests/futex/functional/Makefile b/tools/testing/selftests/futex/functional/Makefile +index ff8feca49746..ad175add3f1d 100644 +--- a/tools/testing/selftests/futex/functional/Makefile ++++ b/tools/testing/selftests/futex/functional/Makefile +@@ -3,11 +3,11 @@ INCLUDES := -I../include -I../../ + CFLAGS := $(CFLAGS) -g -O2 -Wall -D_GNU_SOURCE -pthread $(INCLUDES) + LDFLAGS := $(LDFLAGS) -pthread -lrt + +-HEADERS := \ ++LOCAL_HDRS := \ + ../include/futextest.h \ + ../include/atomic.h \ + ../include/logging.h +-TEST_GEN_FILES := \ ++TEST_GEN_PROGS := \ + futex_wait_timeout \ + futex_wait_wouldblock \ + futex_requeue_pi \ +@@ -19,5 +19,3 @@ TEST_GEN_FILES := \ + TEST_PROGS := run.sh + + include ../../lib.mk +- +-$(TEST_GEN_FILES): $(HEADERS) +-- +2.35.1 + diff --git a/queue-4.14/series b/queue-4.14/series index dd2596751bc..46add138703 100644 --- a/queue-4.14/series +++ b/queue-4.14/series @@ -30,3 +30,7 @@ dmaengine-at_hdmac-don-t-allow-cpu-to-reorder-channel-enable.patch dmaengine-at_hdmac-fix-impossible-condition.patch dmaengine-at_hdmac-check-return-code-of-dma_async_device_register.patch x86-cpu-restore-amd-s-de_cfg-msr-after-resume.patch +selftests-futex-fix-build-for-clang.patch +rtc-cmos-fix-build-on-non-acpi-platforms.patch +drm-imx-imx-tve-fix-return-type-of-imx_tve_connector.patch +bluetooth-l2cap-fix-l2cap_global_chan_by_psm.patch