]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.14-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 11 Dec 2018 13:10:51 +0000 (14:10 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 11 Dec 2018 13:10:51 +0000 (14:10 +0100)
added patches:
staging-atomisp-remove-fun-strncpy-warning.patch
staging-lustre-remove-two-build-warnings.patch

queue-4.14/series
queue-4.14/staging-atomisp-remove-fun-strncpy-warning.patch [new file with mode: 0644]
queue-4.14/staging-lustre-remove-two-build-warnings.patch [new file with mode: 0644]

index 170b70197cf4dd680f89f52de6f241d9bc610599..8d219c6384d75db700cb0e43c49e255da777fdac 100644 (file)
@@ -48,3 +48,5 @@ xhci-workaround-css-timeout-on-amd-snps-3.0-xhc.patch
 xhci-prevent-u1-u2-link-pm-states-if-exit-latency-is-too-long.patch
 f2fs-fix-to-do-sanity-check-with-block-address-in-ma.patch
 swiotlb-clean-up-reporting.patch
+staging-lustre-remove-two-build-warnings.patch
+staging-atomisp-remove-fun-strncpy-warning.patch
diff --git a/queue-4.14/staging-atomisp-remove-fun-strncpy-warning.patch b/queue-4.14/staging-atomisp-remove-fun-strncpy-warning.patch
new file mode 100644 (file)
index 0000000..4cbf649
--- /dev/null
@@ -0,0 +1,43 @@
+From gregkh@linuxfoundation.org  Tue Dec 11 14:08:53 2018
+From: Greg KH <gregkh@linuxfoundation.org>
+Date: Tue, 11 Dec 2018 13:50:55 +0100
+Subject: staging: atomisp: remove "fun" strncpy warning
+To: linux-kernel@vger.kernel.org
+Cc: stable@vger.kernel.org
+Message-ID: <20181211125055.GB25594@kroah.com>
+Content-Disposition: inline
+
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+[for older kernels only, atomisp has been removed from upstream]
+
+gcc-8 rightfully warns that this instance of strncpy is just copying
+from the source, to the same source, for a few bytes.  Meaning this call
+does nothing.  As the author of the code obviously meant it to do
+something, but this code must be working properly, just replace the call
+to the kernel internal strscpy() which gcc doesn't know about, so the
+warning goes away.
+
+As this driver was deleted from newer kernel versions, none of this
+really matters but now at least we do not have to worry about a build
+warning in the stable trees.
+
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/debug/src/ia_css_debug.c |    4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/debug/src/ia_css_debug.c
++++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/debug/src/ia_css_debug.c
+@@ -2860,9 +2860,7 @@ ia_css_debug_pipe_graph_dump_stage(
+                       if (l <= ENABLE_LINE_MAX_LENGTH) {
+                               /* It fits on one line, copy string and init */
+                               /* other helper strings with empty string */
+-                              strcpy_s(enable_info,
+-                                      sizeof(enable_info),
+-                                      ei);
++                              strscpy(enable_info, ei, sizeof(enable_info));
+                       } else {
+                               /* Too big for one line, find last comma */
+                               p = ENABLE_LINE_MAX_LENGTH;
diff --git a/queue-4.14/staging-lustre-remove-two-build-warnings.patch b/queue-4.14/staging-lustre-remove-two-build-warnings.patch
new file mode 100644 (file)
index 0000000..7f0f602
--- /dev/null
@@ -0,0 +1,59 @@
+From gregkh@linuxfoundation.org  Tue Dec 11 14:07:57 2018
+From: Greg KH <gregkh@linuxfoundation.org>
+Date: Tue, 11 Dec 2018 13:50:37 +0100
+Subject: Staging: lustre: remove two build warnings
+To: linux-kernel@vger.kernel.org
+Cc: stable@vger.kernel.org
+Message-ID: <20181211125037.GA25594@kroah.com>
+Content-Disposition: inline
+
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+[for older kernels only, lustre has been removed from upstream]
+
+When someone writes:
+       strncpy(dest, source, sizeof(source));
+they really are just doing the same thing as:
+       strcpy(dest, source);
+but somehow they feel better because they are now using the "safe"
+version of the string functions.  Cargo-cult programming at its
+finest...
+
+gcc-8 rightfully warns you about doing foolish things like this.  Now
+that the stable kernels are all starting to be built using gcc-8, let's
+get rid of this warning so that we do not have to gaze at this horror.
+
+To dropt the warning, just convert the code to using strcpy() so that if
+someone really wants to audit this code and find all of the obvious
+problems, it will be easier to do so.
+
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/staging/lustre/lnet/lnet/config.c   |    3 +--
+ drivers/staging/lustre/lustre/lmv/lmv_obd.c |    2 +-
+ 2 files changed, 2 insertions(+), 3 deletions(-)
+
+--- a/drivers/staging/lustre/lnet/lnet/config.c
++++ b/drivers/staging/lustre/lnet/lnet/config.c
+@@ -354,8 +354,7 @@ lnet_parse_networks(struct list_head *ni
+                               CERROR("Can't allocate net interface name\n");
+                               goto failed;
+                       }
+-                      strncpy(ni->ni_interfaces[niface], iface,
+-                              strlen(iface));
++                      strcpy(ni->ni_interfaces[niface], iface);
+                       niface++;
+                       iface = comma;
+               } while (iface);
+--- a/drivers/staging/lustre/lustre/lmv/lmv_obd.c
++++ b/drivers/staging/lustre/lustre/lmv/lmv_obd.c
+@@ -645,7 +645,7 @@ repeat_fid2path:
+               memmove(ptr + strlen(gf->gf_path) + 1, ptr,
+                       strlen(ori_gf->gf_path));
+-              strncpy(ptr, gf->gf_path, strlen(gf->gf_path));
++              strcpy(ptr, gf->gf_path);
+               ptr += strlen(gf->gf_path);
+               *ptr = '/';
+       }