]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.18-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Apr 2017 14:06:07 +0000 (16:06 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Apr 2017 14:06:07 +0000 (16:06 +0200)
added patches:
fix-signed-unsigned-pointer-warning.patch
mips-asm-compiler-add-new-macros-to-set-isa-and-arch-asm-annotations.patch
nfsd-work-around-a-gcc-5.1-warning.patch

queue-3.18/arm-psci-fix-header-file.patch [deleted file]
queue-3.18/fix-signed-unsigned-pointer-warning.patch [new file with mode: 0644]
queue-3.18/mips-asm-compiler-add-new-macros-to-set-isa-and-arch-asm-annotations.patch [new file with mode: 0644]
queue-3.18/nfsd-work-around-a-gcc-5.1-warning.patch [new file with mode: 0644]
queue-3.18/series

diff --git a/queue-3.18/arm-psci-fix-header-file.patch b/queue-3.18/arm-psci-fix-header-file.patch
deleted file mode 100644 (file)
index 8c4a250..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-From arnd@arndb.de  Thu Apr 27 11:58:20 2017
-From: Arnd Bergmann <arnd@arndb.de>
-Date: Fri, 21 Apr 2017 15:59:17 +0200
-Subject: ARM: psci: fix header file
-To: stable@vger.kernel.org
-Cc: gregkh@linuxfoundation.org, Arnd Bergmann <arnd@arndb.de>, Russell King <linux@arm.linux.org.uk>, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org
-Message-ID: <20170421135923.2735181-1-arnd@arndb.de>
-
-From: Arnd Bergmann <arnd@arndb.de>
-
-Commit be95485a0b828 was incorrectly backported to 3.18 and
-now causes a different build error when CONFIG_SMP is disabled:
-
- arch/arm/kernel/psci.c:287:12: error: redefinition of 'psci_init'
-
-This version is how it should be on 3.18, with the main psci
-code built for both SMP and UP, but the psci_smp_available()
-function only being available for SMP builds.
-
-Fixes: dbcfee724255 ("ARM: 8457/1: psci-smp is built only for SMP")
-Signed-off-by: Arnd Bergmann <arnd@arndb.de>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- arch/arm/include/asm/psci.h | 8 ++++++--
- 1 file changed, 6 insertions(+), 2 deletions(-)
-
-diff --git a/arch/arm/include/asm/psci.h b/arch/arm/include/asm/psci.h
-index e3789fb02c9c..8ca5308a05d7 100644
---- a/arch/arm/include/asm/psci.h
-+++ b/arch/arm/include/asm/psci.h
-@@ -37,11 +37,15 @@ struct psci_operations {
- extern struct psci_operations psci_ops;
- extern struct smp_operations psci_smp_ops;
--#if defined(CONFIG_SMP) && defined(CONFIG_ARM_PSCI)
-+#ifdef CONFIG_ARM_PSCI
- int psci_init(void);
--bool psci_smp_available(void);
- #else
- static inline int psci_init(void) { return 0; }
-+#endif
-+
-+#if defined(CONFIG_SMP) && defined(CONFIG_ARM_PSCI)
-+bool psci_smp_available(void);
-+#else
- static inline bool psci_smp_available(void) { return false; }
- #endif
--- 
-2.9.0
-
diff --git a/queue-3.18/fix-signed-unsigned-pointer-warning.patch b/queue-3.18/fix-signed-unsigned-pointer-warning.patch
new file mode 100644 (file)
index 0000000..b29815e
--- /dev/null
@@ -0,0 +1,71 @@
+From 97c7134ae22fbd2b8730211f9d4d4517264a8efe Mon Sep 17 00:00:00 2001
+From: Kevin Cernekee <cernekee@gmail.com>
+Date: Mon, 10 Nov 2014 13:09:23 -0800
+Subject: Fix signed/unsigned pointer warning
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Kevin Cernekee <cernekee@gmail.com>
+
+commit 97c7134ae22fbd2b8730211f9d4d4517264a8efe upstream.
+
+Commit 2ae83bf93882d1 ("[CIFS] Fix setting time before epoch (negative
+time values)") changed "u64 t" to "s64 t", which makes do_div() complain
+about a pointer signedness mismatch:
+
+      CC      fs/cifs/netmisc.o
+    In file included from ./arch/mips/include/asm/div64.h:12:0,
+                     from include/linux/kernel.h:124,
+                     from include/linux/list.h:8,
+                     from include/linux/wait.h:6,
+                     from include/linux/net.h:23,
+                     from fs/cifs/netmisc.c:25:
+    fs/cifs/netmisc.c: In function ‘cifs_NTtimeToUnix’:
+    include/asm-generic/div64.h:43:28: warning: comparison of distinct pointer types lacks a cast [enabled by default]
+      (void)(((typeof((n)) *)0) == ((uint64_t *)0)); \
+                                ^
+    fs/cifs/netmisc.c:941:22: note: in expansion of macro ‘do_div’
+       ts.tv_nsec = (long)do_div(t, 10000000) * 100;
+
+Introduce a temporary "u64 abs_t" variable to fix this.
+
+Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
+Signed-off-by: Steve French <steve.french@primarydata.com>
+Cc: Arnd Bergmann <arnd@arndb.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ fs/cifs/netmisc.c |   12 +++++++-----
+ 1 file changed, 7 insertions(+), 5 deletions(-)
+
+--- a/fs/cifs/netmisc.c
++++ b/fs/cifs/netmisc.c
+@@ -926,6 +926,7 @@ cifs_NTtimeToUnix(__le64 ntutc)
+       /* Subtract the NTFS time offset, then convert to 1s intervals. */
+       s64 t = le64_to_cpu(ntutc) - NTFS_TIME_OFFSET;
++      u64 abs_t;
+       /*
+        * Unfortunately can not use normal 64 bit division on 32 bit arch, but
+@@ -933,13 +934,14 @@ cifs_NTtimeToUnix(__le64 ntutc)
+        * to special case them
+        */
+       if (t < 0) {
+-              t = -t;
+-              ts.tv_nsec = (long)(do_div(t, 10000000) * 100);
++              abs_t = -t;
++              ts.tv_nsec = (long)(do_div(abs_t, 10000000) * 100);
+               ts.tv_nsec = -ts.tv_nsec;
+-              ts.tv_sec = -t;
++              ts.tv_sec = -abs_t;
+       } else {
+-              ts.tv_nsec = (long)do_div(t, 10000000) * 100;
+-              ts.tv_sec = t;
++              abs_t = t;
++              ts.tv_nsec = (long)do_div(abs_t, 10000000) * 100;
++              ts.tv_sec = abs_t;
+       }
+       return ts;
diff --git a/queue-3.18/mips-asm-compiler-add-new-macros-to-set-isa-and-arch-asm-annotations.patch b/queue-3.18/mips-asm-compiler-add-new-macros-to-set-isa-and-arch-asm-annotations.patch
new file mode 100644 (file)
index 0000000..d6b900d
--- /dev/null
@@ -0,0 +1,42 @@
+From be5136988e25ae0dc8379fcb937efc63d87aba9e Mon Sep 17 00:00:00 2001
+From: Markos Chandras <markos.chandras@imgtec.com>
+Date: Tue, 18 Nov 2014 15:02:32 +0000
+Subject: MIPS: asm: compiler: Add new macros to set ISA and arch asm annotations
+
+From: Markos Chandras <markos.chandras@imgtec.com>
+
+commit be5136988e25ae0dc8379fcb937efc63d87aba9e upstream.
+
+There are certain places where the code uses .set mips32 or .set mips64
+or .set arch=r4000. In preparation of MIPS R6 support, and in order to
+use as less #ifdefs as possible, we define new macros to set similar
+annotations for MIPS R6.
+
+Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
+Cc: Arnd Bergmann <arnd@arndb.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/mips/include/asm/compiler.h |   13 +++++++++++++
+ 1 file changed, 13 insertions(+)
+
+--- a/arch/mips/include/asm/compiler.h
++++ b/arch/mips/include/asm/compiler.h
+@@ -16,4 +16,17 @@
+ #define GCC_REG_ACCUM "accum"
+ #endif
++#ifdef CONFIG_CPU_MIPSR6
++#define MIPS_ISA_LEVEL "mips64r6"
++#define MIPS_ISA_ARCH_LEVEL MIPS_ISA_LEVEL
++#define MIPS_ISA_LEVEL_RAW mips64r6
++#define MIPS_ISA_ARCH_LEVEL_RAW MIPS_ISA_LEVEL_RAW
++#else
++/* MIPS64 is a superset of MIPS32 */
++#define MIPS_ISA_LEVEL "mips64r2"
++#define MIPS_ISA_ARCH_LEVEL "arch=r4000"
++#define MIPS_ISA_LEVEL_RAW mips64r2
++#define MIPS_ISA_ARCH_LEVEL_RAW MIPS_ISA_LEVEL_RAW
++#endif /* CONFIG_CPU_MIPSR6 */
++
+ #endif /* _ASM_COMPILER_H */
diff --git a/queue-3.18/nfsd-work-around-a-gcc-5.1-warning.patch b/queue-3.18/nfsd-work-around-a-gcc-5.1-warning.patch
new file mode 100644 (file)
index 0000000..fe99b6f
--- /dev/null
@@ -0,0 +1,53 @@
+From 6ac75368e1a658903cf57b2bbf66e60d34f55558 Mon Sep 17 00:00:00 2001
+From: Arnd Bergmann <arnd@arndb.de>
+Date: Tue, 12 May 2015 23:31:29 +0200
+Subject: nfsd: work around a gcc-5.1 warning
+
+From: Arnd Bergmann <arnd@arndb.de>
+
+commit 6ac75368e1a658903cf57b2bbf66e60d34f55558 upstream.
+
+gcc-5.0 warns about a potential uninitialized variable use in nfsd:
+
+fs/nfsd/nfs4state.c: In function 'nfsd4_process_open2':
+fs/nfsd/nfs4state.c:3781:3: warning: 'old_deny_bmap' may be used uninitialized in this function [-Wmaybe-uninitialized]
+   reset_union_bmap_deny(old_deny_bmap, stp);
+   ^
+fs/nfsd/nfs4state.c:3760:16: note: 'old_deny_bmap' was declared here
+  unsigned char old_deny_bmap;
+                ^
+
+This is a false positive, the code path that is warned about cannot
+actually be reached.
+
+This adds an initialization for the variable to make the warning go
+away.
+
+Signed-off-by: Arnd Bergmann <arnd@arndb.de>
+Signed-off-by: J. Bruce Fields <bfields@redhat.com>
+Cc: Arnd Bergmann <arnd@arndb.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ fs/nfsd/nfs4state.c |    3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+--- a/fs/nfsd/nfs4state.c
++++ b/fs/nfsd/nfs4state.c
+@@ -3757,7 +3757,7 @@ static __be32
+ nfs4_upgrade_open(struct svc_rqst *rqstp, struct nfs4_file *fp, struct svc_fh *cur_fh, struct nfs4_ol_stateid *stp, struct nfsd4_open *open)
+ {
+       __be32 status;
+-      unsigned char old_deny_bmap;
++      unsigned char old_deny_bmap = stp->st_deny_bmap;
+       if (!test_access(open->op_share_access, stp))
+               return nfs4_get_vfs_file(rqstp, fp, cur_fh, stp, open);
+@@ -3766,7 +3766,6 @@ nfs4_upgrade_open(struct svc_rqst *rqstp
+       spin_lock(&fp->fi_lock);
+       status = nfs4_file_check_deny(fp, open->op_share_deny);
+       if (status == nfs_ok) {
+-              old_deny_bmap = stp->st_deny_bmap;
+               set_deny(open->op_share_deny, stp);
+               fp->fi_share_deny |=
+                               (open->op_share_deny & NFS4_SHARE_DENY_BOTH);
index daa0e242fe0c0bbc85fe17059802689282bb6c68..a06c23e264175e81e158e81b1354f1408a370eb0 100644 (file)
@@ -24,4 +24,6 @@ fs-nfs-fix-new-compiler-warning-about-boolean-in-switch.patch
 iommu-vt-d-remove-unused-variable.patch
 mm-init-fix-zone-boundary-creation.patch
 net-ti-cpmac-fix-compiler-warning-due-to-type-confusion.patch
-arm-psci-fix-header-file.patch
+mips-asm-compiler-add-new-macros-to-set-isa-and-arch-asm-annotations.patch
+nfsd-work-around-a-gcc-5.1-warning.patch
+fix-signed-unsigned-pointer-warning.patch