]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.9-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 18 Sep 2017 14:23:11 +0000 (16:23 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 18 Sep 2017 14:23:11 +0000 (16:23 +0200)
added patches:
ipv6-fix-may-be-used-uninitialized-warning-in-rt6_check.patch
xfs-fix-compiler-warnings.patch

queue-4.9/ipv6-fix-may-be-used-uninitialized-warning-in-rt6_check.patch [new file with mode: 0644]
queue-4.9/series
queue-4.9/xfs-fix-compiler-warnings.patch [new file with mode: 0644]

diff --git a/queue-4.9/ipv6-fix-may-be-used-uninitialized-warning-in-rt6_check.patch b/queue-4.9/ipv6-fix-may-be-used-uninitialized-warning-in-rt6_check.patch
new file mode 100644 (file)
index 0000000..3aec09a
--- /dev/null
@@ -0,0 +1,33 @@
+From 3614364527daa870264f6dde77f02853cdecd02c Mon Sep 17 00:00:00 2001
+From: Steffen Klassert <steffen.klassert@secunet.com>
+Date: Fri, 25 Aug 2017 09:05:42 +0200
+Subject: ipv6: Fix may be used uninitialized warning in rt6_check
+
+From: Steffen Klassert <steffen.klassert@secunet.com>
+
+commit 3614364527daa870264f6dde77f02853cdecd02c upstream.
+
+rt_cookie might be used uninitialized, fix this by
+initializing it.
+
+Fixes: c5cff8561d2d ("ipv6: add rcu grace period before freeing fib6_node")
+Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Cc: Arnd Bergmann <arnd@arndb.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ net/ipv6/route.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/net/ipv6/route.c
++++ b/net/ipv6/route.c
+@@ -1267,7 +1267,7 @@ static void rt6_dst_from_metrics_check(s
+ static struct dst_entry *rt6_check(struct rt6_info *rt, u32 cookie)
+ {
+-      u32 rt_cookie;
++      u32 rt_cookie = 0;
+       if (!rt6_get_cookie_safe(rt, &rt_cookie) || rt_cookie != cookie)
+               return NULL;
index f07ce494cbf9731662f9b5226b7949c993c47976..a1653a2dd38c9ee2415c5f8314e2bcf2d17af924 100644 (file)
@@ -76,3 +76,5 @@ xfs-don-t-set-v3-xflags-for-v2-inodes.patch
 xfs-open-code-end_buffer_async_write-in-xfs_finish_page_writeback.patch
 xfs-use-kmem_free-to-free-return-value-of-kmem_zalloc.patch
 md-raid5-release-flush-io-in-raid5_do_work.patch
+xfs-fix-compiler-warnings.patch
+ipv6-fix-may-be-used-uninitialized-warning-in-rt6_check.patch
diff --git a/queue-4.9/xfs-fix-compiler-warnings.patch b/queue-4.9/xfs-fix-compiler-warnings.patch
new file mode 100644 (file)
index 0000000..418f3ac
--- /dev/null
@@ -0,0 +1,97 @@
+From 7bf7a193a90cadccaad21c5970435c665c40fe27 Mon Sep 17 00:00:00 2001
+From: "Darrick J. Wong" <darrick.wong@oracle.com>
+Date: Thu, 31 Aug 2017 15:11:06 -0700
+Subject: xfs: fix compiler warnings
+
+From: Darrick J. Wong <darrick.wong@oracle.com>
+
+commit 7bf7a193a90cadccaad21c5970435c665c40fe27 upstream.
+
+Fix up all the compiler warnings that have crept in.
+
+Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
+Reviewed-by: Christoph Hellwig <hch@lst.de>
+Cc: Arnd Bergmann <arnd@arndb.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ fs/xfs/libxfs/xfs_bmap.c       |    2 +-
+ fs/xfs/libxfs/xfs_inode_fork.c |    9 +++------
+ fs/xfs/xfs_buf_item.c          |    2 ++
+ fs/xfs/xfs_iops.c              |    2 +-
+ fs/xfs/xfs_log_recover.c       |    4 ++++
+ 5 files changed, 11 insertions(+), 8 deletions(-)
+
+--- a/fs/xfs/libxfs/xfs_bmap.c
++++ b/fs/xfs/libxfs/xfs_bmap.c
+@@ -579,7 +579,7 @@ xfs_bmap_validate_ret(
+ #else
+ #define xfs_bmap_check_leaf_extents(cur, ip, whichfork)               do { } while (0)
+-#define       xfs_bmap_validate_ret(bno,len,flags,mval,onmap,nmap)
++#define       xfs_bmap_validate_ret(bno,len,flags,mval,onmap,nmap)    do { } while (0)
+ #endif /* DEBUG */
+ /*
+--- a/fs/xfs/libxfs/xfs_inode_fork.c
++++ b/fs/xfs/libxfs/xfs_inode_fork.c
+@@ -1539,14 +1539,11 @@ xfs_iext_realloc_indirect(
+       xfs_ifork_t     *ifp,           /* inode fork pointer */
+       int             new_size)       /* new indirection array size */
+ {
+-      int             nlists;         /* number of irec's (ex lists) */
+-      int             size;           /* current indirection array size */
+-
+       ASSERT(ifp->if_flags & XFS_IFEXTIREC);
+-      nlists = ifp->if_real_bytes / XFS_IEXT_BUFSZ;
+-      size = nlists * sizeof(xfs_ext_irec_t);
+       ASSERT(ifp->if_real_bytes);
+-      ASSERT((new_size >= 0) && (new_size != size));
++      ASSERT((new_size >= 0) &&
++             (new_size != ((ifp->if_real_bytes / XFS_IEXT_BUFSZ) *
++                           sizeof(xfs_ext_irec_t))));
+       if (new_size == 0) {
+               xfs_iext_destroy(ifp);
+       } else {
+--- a/fs/xfs/xfs_buf_item.c
++++ b/fs/xfs/xfs_buf_item.c
+@@ -570,7 +570,9 @@ xfs_buf_item_unlock(
+       bool                    aborted = !!(lip->li_flags & XFS_LI_ABORTED);
+       bool                    hold = !!(bip->bli_flags & XFS_BLI_HOLD);
+       bool                    dirty = !!(bip->bli_flags & XFS_BLI_DIRTY);
++#if defined(DEBUG) || defined(XFS_WARN)
+       bool                    ordered = !!(bip->bli_flags & XFS_BLI_ORDERED);
++#endif
+       /* Clear the buffer's association with this transaction. */
+       bp->b_transp = NULL;
+--- a/fs/xfs/xfs_iops.c
++++ b/fs/xfs/xfs_iops.c
+@@ -802,7 +802,7 @@ xfs_vn_setattr_nonsize(
+  * Caution: The caller of this function is responsible for calling
+  * setattr_prepare() or otherwise verifying the change is fine.
+  */
+-int
++STATIC int
+ xfs_setattr_size(
+       struct xfs_inode        *ip,
+       struct iattr            *iattr)
+--- a/fs/xfs/xfs_log_recover.c
++++ b/fs/xfs/xfs_log_recover.c
+@@ -4827,12 +4827,16 @@ xlog_recover_process_intents(
+       int                     error = 0;
+       struct xfs_ail_cursor   cur;
+       struct xfs_ail          *ailp;
++#if defined(DEBUG) || defined(XFS_WARN)
+       xfs_lsn_t               last_lsn;
++#endif
+       ailp = log->l_ailp;
+       spin_lock(&ailp->xa_lock);
+       lip = xfs_trans_ail_cursor_first(ailp, &cur, 0);
++#if defined(DEBUG) || defined(XFS_WARN)
+       last_lsn = xlog_assign_lsn(log->l_curr_cycle, log->l_curr_block);
++#endif
+       while (lip != NULL) {
+               /*
+                * We're done when we see something other than an intent.