From: Greg Kroah-Hartman Date: Fri, 5 May 2017 17:47:22 +0000 (-0700) Subject: 3.18-stable patches X-Git-Tag: v3.18.52~10 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c14f0150ae577748a353c99c638ac395088a8f5b;p=thirdparty%2Fkernel%2Fstable-queue.git 3.18-stable patches 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 --- 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 index 00000000000..7b7a72c01d8 --- /dev/null +++ b/queue-3.18/gfs2-remove-is_err_value-abuse.patch @@ -0,0 +1,74 @@ +From arnd@arndb.de Fri May 5 10:45:31 2017 +From: Arnd Bergmann +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 +Message-ID: <20170505115725.1424772-10-arnd@arndb.de> + +From: Arnd Bergmann + +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 +Signed-off-by: Greg Kroah-Hartman +--- + 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 index 00000000000..b212eaf43c7 --- /dev/null +++ b/queue-3.18/kbuild-mergeconfig-fix-jobserver-unavailable-warning.patch @@ -0,0 +1,55 @@ +From de4619937229378e81f95e99c9866acc8e207d34 Mon Sep 17 00:00:00 2001 +From: Masahiro Yamada +Date: Fri, 13 Mar 2015 15:21:38 +0900 +Subject: kbuild: mergeconfig: fix "jobserver unavailable" warning + +From: Masahiro Yamada + +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 +Reviewed-by: Josh Triplett +Reviewed-by: Darren Hart +Signed-off-by: Michal Marek +Signed-off-by: Arnd Bergmann +Signed-off-by: Greg Kroah-Hartman + +--- + 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 index 00000000000..5f88f2f2877 --- /dev/null +++ b/queue-3.18/scsi-advansys-remove-warning-message.patch @@ -0,0 +1,45 @@ +From arnd@arndb.de Fri May 5 10:43:24 2017 +From: Arnd Bergmann +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 , Hannes Reinecke +Message-ID: <20170505115725.1424772-7-arnd@arndb.de> + +From: Arnd Bergmann + +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 +Signed-off-by: Arnd Bergmann +Signed-off-by: Greg Kroah-Hartman +--- + 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 + #include + +-/* 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 index 6af8ec93ed8..00000000000 --- a/queue-3.18/scsi-advansys.c-remove-dma-build-warning-message.patch +++ /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 -From: Greg Kroah-Hartman -Subject: scsi: advansys.c: remove DMA build warning message - -From: Greg Kroah-Hartman - -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 -Signed-off-by: Greg Kroah-Hartman - ---- - 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 diff --git a/queue-3.18/series b/queue-3.18/series index 0143a2bb5b3..d31bc1d2983 100644 --- a/queue-3.18/series +++ b/queue-3.18/series @@ -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 diff --git a/queue-3.18/staging-unisys-fix-build-warning-in-periodic_work.patch b/queue-3.18/staging-unisys-correctly-handle-return-value-from-queue_delayed_work.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 77e8f275907..3322c8f0703 100644 --- a/queue-3.18/staging-unisys-fix-build-warning-in-periodic_work.patch +++ b/queue-3.18/staging-unisys-correctly-handle-return-value-from-queue_delayed_work.patch @@ -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 -From: Greg Kroah-Hartman -Subject: staging: unisys: fix build warning in periodic_work +From f84bd6267d623b49f196d54ba9edc41ff1c4d5e3 Mon Sep 17 00:00:00 2001 +From: Benjamin Romer +Date: Thu, 1 Oct 2015 11:52:30 -0400 +Subject: staging: unisys: correctly handle return value from queue_delayed_work() -From: Greg Kroah-Hartman +From: Benjamin Romer -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 -Signed-off-by: Greg Kroah-Hartman +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 . +[arnd: the fix is from 4.4 but needed some minor fixup to adapt + to context changes] + +Signed-off-by: Benjamin Romer +Signed-off-by: Greg Kroah-Hartman +Signed-off-by: Arnd Bergmann --- 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 index 00000000000..e69de29bb2d