]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.18-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 5 May 2017 17:47:22 +0000 (10:47 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 5 May 2017 17:47:22 +0000 (10:47 -0700)
added patches:
gfs2-remove-is_err_value-abuse.patch
kbuild-mergeconfig-fix-jobserver-unavailable-warning.patch
scsi-advansys-remove-warning-message.patch
staging-unisys-correctly-handle-return-value-from-queue_delayed_work.patch

queue-3.18/gfs2-remove-is_err_value-abuse.patch [new file with mode: 0644]
queue-3.18/kbuild-mergeconfig-fix-jobserver-unavailable-warning.patch [new file with mode: 0644]
queue-3.18/scsi-advansys-remove-warning-message.patch [new file with mode: 0644]
queue-3.18/scsi-advansys.c-remove-dma-build-warning-message.patch [deleted file]
queue-3.18/series
queue-3.18/staging-unisys-correctly-handle-return-value-from-queue_delayed_work.patch [moved from queue-3.18/staging-unisys-fix-build-warning-in-periodic_work.patch with 60% similarity]
queue-4.11/series [new file with mode: 0644]

diff --git a/queue-3.18/gfs2-remove-is_err_value-abuse.patch b/queue-3.18/gfs2-remove-is_err_value-abuse.patch
new file mode 100644 (file)
index 0000000..7b7a72c
--- /dev/null
@@ -0,0 +1,74 @@
+From arnd@arndb.de  Fri May  5 10:45:31 2017
+From: Arnd Bergmann <arnd@arndb.de>
+Date: Fri,  5 May 2017 13:57:25 +0200
+Subject: gfs2: remove IS_ERR_VALUE abuse
+To: gregkh@linuxfoundation.org
+Cc: stable@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>
+Message-ID: <20170505115725.1424772-10-arnd@arndb.de>
+
+From: Arnd Bergmann <arnd@arndb.de>
+
+Picked from commit 287980e49ffc0f6d911601e7e352a812ed27768e ("remove lots
+of IS_ERR_VALUE abuses") upstream.
+
+The original fix that was backported to 3.18 already addressed the warning
+in some configurations, but not in others, leaving us with the same output:
+
+../fs/gfs2/dir.c: In function 'get_first_leaf':
+../fs/gfs2/dir.c:768:9: warning: 'leaf_no' may be used uninitialized in this function [-Wmaybe-uninitialized]
+   error = get_leaf(dip, leaf_no, bh_out);
+         ^
+../fs/gfs2/dir.c: In function 'dir_split_leaf.isra.20':
+../fs/gfs2/dir.c:987:8: warning: 'leaf_no' may be used uninitialized in this function [-Wmaybe-uninitialized]
+
+This takes the approach that we took in later versions in mainline,
+but does not backport the entire patch, as that would be too large
+for stable and IIRC caused regressions in other drivers.
+
+Fixes: 9d46d31e9aea ("gfs2: avoid uninitialized variable warning")
+Signed-off-by: Arnd Bergmann <arnd@arndb.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ fs/gfs2/dir.c |   15 +++++++++------
+ 1 file changed, 9 insertions(+), 6 deletions(-)
+
+--- a/fs/gfs2/dir.c
++++ b/fs/gfs2/dir.c
+@@ -749,12 +749,15 @@ static int get_leaf_nr(struct gfs2_inode
+                      u64 *leaf_out)
+ {
+       __be64 *hash;
++      int error;
+       hash = gfs2_dir_get_hash_table(dip);
+-      if (IS_ERR(hash))
+-              return PTR_ERR(hash);
+-      *leaf_out = be64_to_cpu(*(hash + index));
+-      return 0;
++      error = PTR_ERR_OR_ZERO(hash);
++
++      if (!error)
++              *leaf_out = be64_to_cpu(*(hash + index));
++
++      return error;
+ }
+ static int get_first_leaf(struct gfs2_inode *dip, u32 index,
+@@ -764,7 +767,7 @@ static int get_first_leaf(struct gfs2_in
+       int error;
+       error = get_leaf_nr(dip, index, &leaf_no);
+-      if (!IS_ERR_VALUE(error))
++      if (!error)
+               error = get_leaf(dip, leaf_no, bh_out);
+       return error;
+@@ -980,7 +983,7 @@ static int dir_split_leaf(struct inode *
+       index = name->hash >> (32 - dip->i_depth);
+       error = get_leaf_nr(dip, index, &leaf_no);
+-      if (IS_ERR_VALUE(error))
++      if (error)
+               return error;
+       /*  Get the old leaf block  */
diff --git a/queue-3.18/kbuild-mergeconfig-fix-jobserver-unavailable-warning.patch b/queue-3.18/kbuild-mergeconfig-fix-jobserver-unavailable-warning.patch
new file mode 100644 (file)
index 0000000..b212eaf
--- /dev/null
@@ -0,0 +1,55 @@
+From de4619937229378e81f95e99c9866acc8e207d34 Mon Sep 17 00:00:00 2001
+From: Masahiro Yamada <yamada.masahiro@socionext.com>
+Date: Fri, 13 Mar 2015 15:21:38 +0900
+Subject: kbuild: mergeconfig: fix "jobserver unavailable" warning
+
+From: Masahiro Yamada <yamada.masahiro@socionext.com>
+
+commit de4619937229378e81f95e99c9866acc8e207d34 upstream.
+
+If "make kvmconfig" is run with "-j" option, a warning message,
+"jobserver unavailable: using -j1.  Add `+' to parent make rule.",
+is displayed.
+
+  $ make -s defconfig
+  *** Default configuration is based on 'x86_64_defconfig'
+  #
+  # configuration written to .config
+  #
+  $ make -j8 kvmconfig
+  Using ./.config as base
+  Merging ./arch/x86/configs/kvm_guest.config
+    [ snip ]
+  #
+  # merged configuration written to ./.config (needs make)
+  #
+  make[2]: warning: jobserver unavailable: using -j1.  Add `+' to
+  parent make rule.
+  scripts/kconfig/conf --oldconfig Kconfig
+    [ snip ]
+  #
+  # configuration written to .config
+  #
+
+Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
+Reviewed-by: Josh Triplett <josh@joshtriplett.org>
+Reviewed-by: Darren Hart <dvhart@linux.intel.com>
+Signed-off-by: Michal Marek <mmarek@suse.cz>
+Signed-off-by: Arnd Bergmann <arnd@arndb.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ scripts/kconfig/Makefile |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/scripts/kconfig/Makefile
++++ b/scripts/kconfig/Makefile
+@@ -110,7 +110,7 @@ define mergeconfig
+ $(if $(wildcard $(objtree)/.config),, $(error You need an existing .config for this target))
+ $(if $(call configfiles,$(1)),, $(error No configuration exists for this target on this architecture))
+ $(Q)$(CONFIG_SHELL) $(srctree)/scripts/kconfig/merge_config.sh -m -O $(objtree) $(objtree)/.config $(call configfiles,$(1))
+-$(Q)yes "" | $(MAKE) -f $(srctree)/Makefile oldconfig
+++$(Q)yes "" | $(MAKE) -f $(srctree)/Makefile oldconfig
+ endef
+ PHONY += kvmconfig
diff --git a/queue-3.18/scsi-advansys-remove-warning-message.patch b/queue-3.18/scsi-advansys-remove-warning-message.patch
new file mode 100644 (file)
index 0000000..5f88f2f
--- /dev/null
@@ -0,0 +1,45 @@
+From arnd@arndb.de  Fri May  5 10:43:24 2017
+From: Arnd Bergmann <arnd@arndb.de>
+Date: Fri,  5 May 2017 13:57:22 +0200
+Subject: scsi: advansys: remove #warning message
+To: gregkh@linuxfoundation.org
+Cc: stable@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>, Hannes Reinecke <hare@suse.de>
+Message-ID: <20170505115725.1424772-7-arnd@arndb.de>
+
+From: Arnd Bergmann <arnd@arndb.de>
+
+The advansys driver was converted to the proper DMA API in linux-4.2, but
+the 3.18-stable kernel still warns about this:
+
+drivers/scsi/advansys.c:71:2: warning: #warning this driver is still not properly converted to the DMA API [-Wcpp]
+
+The warning clearly is not helpful in 3.18 any more, it just clutters up
+the build log. This removes the warning instead, and clarifies the
+comment above it.
+
+Cc: Hannes Reinecke <hare@suse.de>
+Signed-off-by: Arnd Bergmann <arnd@arndb.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/scsi/advansys.c |    3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+--- a/drivers/scsi/advansys.c
++++ b/drivers/scsi/advansys.c
+@@ -49,7 +49,7 @@
+ #include <scsi/scsi.h>
+ #include <scsi/scsi_host.h>
+-/* FIXME:
++/* Fixed in linux-4.2, not backported to 3.18:
+  *
+  *  1. Although all of the necessary command mapping places have the
+  *     appropriate dma_map.. APIs, the driver still processes its internal
+@@ -68,7 +68,6 @@
+  *  7. advansys_info is not safe against multiple simultaneous callers
+  *  8. Add module_param to override ISA/VLB ioport array
+  */
+-#warning this driver is still not properly converted to the DMA API
+ /* Enable driver /proc statistics. */
+ #define ADVANSYS_STATS
diff --git a/queue-3.18/scsi-advansys.c-remove-dma-build-warning-message.patch b/queue-3.18/scsi-advansys.c-remove-dma-build-warning-message.patch
deleted file mode 100644 (file)
index 6af8ec9..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-From foo@baz Thu May  4 16:05:52 PDT 2017
-Date: Thu, 04 May 2017 16:05:52 -0700
-To: Greg KH <gregkh@linuxfoundation.org>
-From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-Subject: scsi: advansys.c: remove DMA build warning message
-
-From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
-The driver was finally converted to the "new" DMA api in newer kernels,
-but here in 3.18, it never will happen, so just shut the warning up for
-now as obviously no one is going to do anything about it.
-
-Cc: Arnd Bergmann <arnd@arndb.de>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
----
- drivers/scsi/advansys.c |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/drivers/scsi/advansys.c
-+++ b/drivers/scsi/advansys.c
-@@ -68,7 +68,7 @@
-  *  7. advansys_info is not safe against multiple simultaneous callers
-  *  8. Add module_param to override ISA/VLB ioport array
-  */
--#warning this driver is still not properly converted to the DMA API
-+/*#warning this driver is still not properly converted to the DMA API */
- /* Enable driver /proc statistics. */
- #define ADVANSYS_STATS
index 0143a2bb5b3dfbe8dab61b92fdef280960ac86e3..d31bc1d29830148505d60459924736543b9275e5 100644 (file)
@@ -57,10 +57,12 @@ mm-cma-silence-warnings-due-to-max-usage.patch
 mips-jz4740-fix-build-error-in-irq.h.patch
 mips-elf2ecoff-ignore-pt_mips_abiflags-program-headers.patch
 mips-elf2ecoff-fix-warning-due-to-dead-code.patch
-staging-unisys-fix-build-warning-in-periodic_work.patch
+staging-unisys-correctly-handle-return-value-from-queue_delayed_work.patch
 message-i2o-fix-64bit-build-warnings.patch
-scsi-advansys.c-remove-dma-build-warning-message.patch
+scsi-advansys-remove-warning-message.patch
 modpost-expand-pattern-matching-to-support-substring-matches.patch
 modpost-don-t-emit-section-mismatch-warnings-for-compiler-optimizations.patch
 cpumask_set_cpu_local_first-cpumask_local_spread-lament.patch
 e1000e-fix-call-to-do_div-to-use-u64-arg.patch
+gfs2-remove-is_err_value-abuse.patch
+kbuild-mergeconfig-fix-jobserver-unavailable-warning.patch
similarity index 60%
rename from queue-3.18/staging-unisys-fix-build-warning-in-periodic_work.patch
rename to queue-3.18/staging-unisys-correctly-handle-return-value-from-queue_delayed_work.patch
index 77e8f2759074b7b5b01fe7075f5a81bce3ae7674..3322c8f0703b2745d5d6167a4a7a2d9cf92b97fc 100644 (file)
@@ -1,18 +1,23 @@
-From foo@baz Thu May  4 15:57:02 PDT 2017
-Date: Thu, 04 May 2017 15:57:02 -0700
-To: Greg KH <gregkh@linuxfoundation.org>
-From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-Subject: staging: unisys: fix build warning in periodic_work
+From f84bd6267d623b49f196d54ba9edc41ff1c4d5e3 Mon Sep 17 00:00:00 2001
+From: Benjamin Romer <benjamin.romer@unisys.com>
+Date: Thu, 1 Oct 2015 11:52:30 -0400
+Subject: staging: unisys: correctly handle return value from queue_delayed_work()
 
-From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+From: Benjamin Romer <benjamin.romer@unisys.com>
 
-This code is long gone in mainline, so the build warning about trying to
-compare a bool to a value less than 0 isn't there.  But fix it in 3.18
-to get the build warning list down to a small number.
+commit f84bd6267d623b49f196d54ba9edc41ff1c4d5e3 upstream.
 
-Cc: Arnd Bergmann <arnd@arndb.de>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Properly handle the return value from queue_delayed_work() - it's a
+bool, not an int, so using a less than comparison isn't appropriate.
+
+This mistake was found by David Binderman <dcb314@hotmail.com>.
 
+[arnd: the fix is from 4.4 but needed some minor fixup to adapt
+ to context changes]
+
+Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Signed-off-by: Arnd Bergmann <arnd@arndb.de>
 ---
  drivers/staging/unisys/visorutil/periodic_work.c |    8 ++++----
  1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/queue-4.11/series b/queue-4.11/series
new file mode 100644 (file)
index 0000000..e69de29