From 4d6c3466efcc45e6f8c5a3bc0db2ccce2367a5fb Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 20 Sep 2022 18:44:29 +0200 Subject: [PATCH] 5.10-stable patches added patches: cifs-don-t-send-down-the-destination-address-to-sendmsg-for-a-sock_stream.patch cifs-revalidate-mapping-when-doing-direct-writes.patch of-device-fix-up-of_dma_configure_id-stub.patch tools-include-uapi-fix-asm-errno.h-for-parisc-and-xtensa.patch --- ...address-to-sendmsg-for-a-sock_stream.patch | 34 +++++++++++++++ ...ate-mapping-when-doing-direct-writes.patch | 37 ++++++++++++++++ ...vice-fix-up-of_dma_configure_id-stub.patch | 40 ++++++++++++++++++ queue-5.10/series | 4 ++ ...ix-asm-errno.h-for-parisc-and-xtensa.patch | 42 +++++++++++++++++++ 5 files changed, 157 insertions(+) create mode 100644 queue-5.10/cifs-don-t-send-down-the-destination-address-to-sendmsg-for-a-sock_stream.patch create mode 100644 queue-5.10/cifs-revalidate-mapping-when-doing-direct-writes.patch create mode 100644 queue-5.10/of-device-fix-up-of_dma_configure_id-stub.patch create mode 100644 queue-5.10/tools-include-uapi-fix-asm-errno.h-for-parisc-and-xtensa.patch diff --git a/queue-5.10/cifs-don-t-send-down-the-destination-address-to-sendmsg-for-a-sock_stream.patch b/queue-5.10/cifs-don-t-send-down-the-destination-address-to-sendmsg-for-a-sock_stream.patch new file mode 100644 index 00000000000..32b29d27f94 --- /dev/null +++ b/queue-5.10/cifs-don-t-send-down-the-destination-address-to-sendmsg-for-a-sock_stream.patch @@ -0,0 +1,34 @@ +From 17d3df38dc5f4cec9b0ac6eb79c1859b6e2693a4 Mon Sep 17 00:00:00 2001 +From: Stefan Metzmacher +Date: Wed, 14 Sep 2022 05:25:46 +0200 +Subject: cifs: don't send down the destination address to sendmsg for a SOCK_STREAM + +From: Stefan Metzmacher + +commit 17d3df38dc5f4cec9b0ac6eb79c1859b6e2693a4 upstream. + +This is ignored anyway by the tcp layer. + +Signed-off-by: Stefan Metzmacher +Cc: stable@vger.kernel.org +Reviewed-by: Ronnie Sahlberg +Reviewed-by: Paulo Alcantara (SUSE) +Signed-off-by: Steve French +Signed-off-by: Greg Kroah-Hartman +--- + fs/cifs/transport.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/fs/cifs/transport.c ++++ b/fs/cifs/transport.c +@@ -209,8 +209,8 @@ smb_send_kvec(struct TCP_Server_Info *se + + *sent = 0; + +- smb_msg->msg_name = (struct sockaddr *) &server->dstaddr; +- smb_msg->msg_namelen = sizeof(struct sockaddr); ++ smb_msg->msg_name = NULL; ++ smb_msg->msg_namelen = 0; + smb_msg->msg_control = NULL; + smb_msg->msg_controllen = 0; + if (server->noblocksnd) diff --git a/queue-5.10/cifs-revalidate-mapping-when-doing-direct-writes.patch b/queue-5.10/cifs-revalidate-mapping-when-doing-direct-writes.patch new file mode 100644 index 00000000000..11caf0ea79e --- /dev/null +++ b/queue-5.10/cifs-revalidate-mapping-when-doing-direct-writes.patch @@ -0,0 +1,37 @@ +From 7500a99281dfed2d4a84771c933bcb9e17af279b Mon Sep 17 00:00:00 2001 +From: Ronnie Sahlberg +Date: Mon, 12 Sep 2022 13:04:46 +1000 +Subject: cifs: revalidate mapping when doing direct writes + +From: Ronnie Sahlberg + +commit 7500a99281dfed2d4a84771c933bcb9e17af279b upstream. + +Kernel bugzilla: 216301 + +When doing direct writes we need to also invalidate the mapping in case +we have a cached copy of the affected page(s) in memory or else +subsequent reads of the data might return the old/stale content +before we wrote an update to the server. + +Cc: stable@vger.kernel.org +Reviewed-by: Paulo Alcantara (SUSE) +Signed-off-by: Ronnie Sahlberg +Signed-off-by: Steve French +Signed-off-by: Greg Kroah-Hartman +--- + fs/cifs/file.c | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/fs/cifs/file.c ++++ b/fs/cifs/file.c +@@ -3244,6 +3244,9 @@ static ssize_t __cifs_writev( + + ssize_t cifs_direct_writev(struct kiocb *iocb, struct iov_iter *from) + { ++ struct file *file = iocb->ki_filp; ++ ++ cifs_revalidate_mapping(file->f_inode); + return __cifs_writev(iocb, from, true); + } + diff --git a/queue-5.10/of-device-fix-up-of_dma_configure_id-stub.patch b/queue-5.10/of-device-fix-up-of_dma_configure_id-stub.patch new file mode 100644 index 00000000000..17a0db47d82 --- /dev/null +++ b/queue-5.10/of-device-fix-up-of_dma_configure_id-stub.patch @@ -0,0 +1,40 @@ +From 40bfe7a86d84cf08ac6a8fe2f0c8bf7a43edd110 Mon Sep 17 00:00:00 2001 +From: Thierry Reding +Date: Wed, 24 Aug 2022 17:32:56 +0200 +Subject: of/device: Fix up of_dma_configure_id() stub + +From: Thierry Reding + +commit 40bfe7a86d84cf08ac6a8fe2f0c8bf7a43edd110 upstream. + +Since the stub version of of_dma_configure_id() was added in commit +a081bd4af4ce ("of/device: Add input id to of_dma_configure()"), it has +not matched the signature of the full function, leading to build failure +reports when code using this function is built on !OF configurations. + +Fixes: a081bd4af4ce ("of/device: Add input id to of_dma_configure()") +Cc: stable@vger.kernel.org +Signed-off-by: Thierry Reding +Reviewed-by: Frank Rowand +Acked-by: Lorenzo Pieralisi +Link: https://lore.kernel.org/r/20220824153256.1437483-1-thierry.reding@gmail.com +Signed-off-by: Rob Herring +Signed-off-by: Greg Kroah-Hartman +--- + include/linux/of_device.h | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +--- a/include/linux/of_device.h ++++ b/include/linux/of_device.h +@@ -113,8 +113,9 @@ static inline struct device_node *of_cpu + } + + static inline int of_dma_configure_id(struct device *dev, +- struct device_node *np, +- bool force_dma) ++ struct device_node *np, ++ bool force_dma, ++ const u32 *id) + { + return 0; + } diff --git a/queue-5.10/series b/queue-5.10/series index f321d73c09e..152bb3b32f4 100644 --- a/queue-5.10/series +++ b/queue-5.10/series @@ -17,3 +17,7 @@ drm-meson-correct-osd1-global-alpha-value.patch drm-meson-fix-osd1-rgb-to-ycbcr-coefficient.patch parisc-ccio-dma-add-missing-iounmap-in-error-path-in.patch tracing-hold-caller_addr-to-hardirq_-enable-disable-.patch +of-device-fix-up-of_dma_configure_id-stub.patch +cifs-revalidate-mapping-when-doing-direct-writes.patch +cifs-don-t-send-down-the-destination-address-to-sendmsg-for-a-sock_stream.patch +tools-include-uapi-fix-asm-errno.h-for-parisc-and-xtensa.patch diff --git a/queue-5.10/tools-include-uapi-fix-asm-errno.h-for-parisc-and-xtensa.patch b/queue-5.10/tools-include-uapi-fix-asm-errno.h-for-parisc-and-xtensa.patch new file mode 100644 index 00000000000..c58c8121802 --- /dev/null +++ b/queue-5.10/tools-include-uapi-fix-asm-errno.h-for-parisc-and-xtensa.patch @@ -0,0 +1,42 @@ +From 95363747a6f39e88a3052fcf6ce6237769495ce0 Mon Sep 17 00:00:00 2001 +From: Ben Hutchings +Date: Tue, 25 Aug 2020 23:27:40 +0100 +Subject: tools/include/uapi: Fix for parisc and xtensa + +From: Ben Hutchings + +commit 95363747a6f39e88a3052fcf6ce6237769495ce0 upstream. + +tools/include/uapi/asm/errno.h currently attempts to include +non-existent arch-specific errno.h header for xtensa. +Remove this case so that is used instead, +and add the missing arch-specific header for parisc. + +References: https://buildd.debian.org/status/fetch.php?pkg=linux&arch=ia64&ver=5.8.3-1%7Eexp1&stamp=1598340829&raw=1 +Signed-off-by: Ben Hutchings +Signed-off-by: Salvatore Bonaccorso +Cc: # 5.10+ +Signed-off-by: Helge Deller +Signed-off-by: Greg Kroah-Hartman +--- + tools/include/uapi/asm/errno.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/tools/include/uapi/asm/errno.h b/tools/include/uapi/asm/errno.h +index d30439b4b8ab..869379f91fe4 100644 +--- a/tools/include/uapi/asm/errno.h ++++ b/tools/include/uapi/asm/errno.h +@@ -9,8 +9,8 @@ + #include "../../../arch/alpha/include/uapi/asm/errno.h" + #elif defined(__mips__) + #include "../../../arch/mips/include/uapi/asm/errno.h" +-#elif defined(__xtensa__) +-#include "../../../arch/xtensa/include/uapi/asm/errno.h" ++#elif defined(__hppa__) ++#include "../../../arch/parisc/include/uapi/asm/errno.h" + #else + #include + #endif +-- +2.37.3 + -- 2.47.3