]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 3 Jul 2017 10:02:28 +0000 (12:02 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 3 Jul 2017 10:02:28 +0000 (12:02 +0200)
added patches:
btrfs-fix-truncate-down-when-no_holes-feature-is-enabled.patch
gianfar-do-not-reuse-pages-from-emergency-reserve.patch
powerpc-eeh-enable-io-path-on-permanent-error.patch

queue-4.4/btrfs-fix-truncate-down-when-no_holes-feature-is-enabled.patch [new file with mode: 0644]
queue-4.4/gianfar-do-not-reuse-pages-from-emergency-reserve.patch [new file with mode: 0644]
queue-4.4/powerpc-eeh-enable-io-path-on-permanent-error.patch [new file with mode: 0644]
queue-4.4/series

diff --git a/queue-4.4/btrfs-fix-truncate-down-when-no_holes-feature-is-enabled.patch b/queue-4.4/btrfs-fix-truncate-down-when-no_holes-feature-is-enabled.patch
new file mode 100644 (file)
index 0000000..39b28bc
--- /dev/null
@@ -0,0 +1,54 @@
+From foo@baz Mon Jul  3 11:54:22 CEST 2017
+From: Liu Bo <bo.li.liu@oracle.com>
+Date: Thu, 1 Dec 2016 13:43:31 -0800
+Subject: Btrfs: fix truncate down when no_holes feature is enabled
+
+From: Liu Bo <bo.li.liu@oracle.com>
+
+
+[ Upstream commit 91298eec05cd8d4e828cf7ee5d4a6334f70cf69a ]
+
+For such a file mapping,
+
+[0-4k][hole][8k-12k]
+
+In NO_HOLES mode, we don't have the [hole] extent any more.
+Commit c1aa45759e90 ("Btrfs: fix shrinking truncate when the no_holes feature is enabled")
+ fixed disk isize not being updated in NO_HOLES mode when data is not flushed.
+
+However, even if data has been flushed, we can still have trouble
+in updating disk isize since we updated disk isize to 'start' of
+the last evicted extent.
+
+Reviewed-by: Chris Mason <clm@fb.com>
+Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
+Signed-off-by: David Sterba <dsterba@suse.com>
+Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ fs/btrfs/inode.c |   13 ++++++++++++-
+ 1 file changed, 12 insertions(+), 1 deletion(-)
+
+--- a/fs/btrfs/inode.c
++++ b/fs/btrfs/inode.c
+@@ -4397,8 +4397,19 @@ search_again:
+               if (found_type > min_type) {
+                       del_item = 1;
+               } else {
+-                      if (item_end < new_size)
++                      if (item_end < new_size) {
++                              /*
++                               * With NO_HOLES mode, for the following mapping
++                               *
++                               * [0-4k][hole][8k-12k]
++                               *
++                               * if truncating isize down to 6k, it ends up
++                               * isize being 8k.
++                               */
++                              if (btrfs_fs_incompat(root->fs_info, NO_HOLES))
++                                      last_size = new_size;
+                               break;
++                      }
+                       if (found_key.offset >= new_size)
+                               del_item = 1;
+                       else
diff --git a/queue-4.4/gianfar-do-not-reuse-pages-from-emergency-reserve.patch b/queue-4.4/gianfar-do-not-reuse-pages-from-emergency-reserve.patch
new file mode 100644 (file)
index 0000000..0d250a9
--- /dev/null
@@ -0,0 +1,41 @@
+From foo@baz Mon Jul  3 11:54:22 CEST 2017
+From: Eric Dumazet <edumazet@google.com>
+Date: Wed, 18 Jan 2017 19:44:42 -0800
+Subject: gianfar: Do not reuse pages from emergency reserve
+
+From: Eric Dumazet <edumazet@google.com>
+
+
+[ Upstream commit 69fed99baac186013840ced3524562841296034f ]
+
+A driver using dev_alloc_page() must not reuse a page that had to
+use emergency memory reserve.
+
+Otherwise all packets using this page will be immediately dropped,
+unless for very specific sockets having SOCK_MEMALLOC bit set.
+
+This issue might be hard to debug, because only a fraction of the RX
+ring buffer would suffer from drops.
+
+Fixes: 75354148ce69 ("gianfar: Add paged allocation and Rx S/G")
+Signed-off-by: Eric Dumazet <edumazet@google.com>
+Cc: Claudiu Manoil <claudiu.manoil@freescale.com>
+Acked-by: Claudiu Manoil <claudiu.manoil@nxp.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/ethernet/freescale/gianfar.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/net/ethernet/freescale/gianfar.c
++++ b/drivers/net/ethernet/freescale/gianfar.c
+@@ -2939,7 +2939,7 @@ static bool gfar_add_rx_frag(struct gfar
+                               size, GFAR_RXB_TRUESIZE);
+       /* try reuse page */
+-      if (unlikely(page_count(page) != 1))
++      if (unlikely(page_count(page) != 1 || page_is_pfmemalloc(page)))
+               return false;
+       /* change offset to the other half */
diff --git a/queue-4.4/powerpc-eeh-enable-io-path-on-permanent-error.patch b/queue-4.4/powerpc-eeh-enable-io-path-on-permanent-error.patch
new file mode 100644 (file)
index 0000000..85943b0
--- /dev/null
@@ -0,0 +1,62 @@
+From foo@baz Mon Jul  3 11:54:22 CEST 2017
+From: Gavin Shan <gwshan@linux.vnet.ibm.com>
+Date: Fri, 6 Jan 2017 10:39:49 +1100
+Subject: powerpc/eeh: Enable IO path on permanent error
+
+From: Gavin Shan <gwshan@linux.vnet.ibm.com>
+
+
+[ Upstream commit 387bbc974f6adf91aa635090f73434ed10edd915 ]
+
+We give up recovery on permanent error, simply shutdown the affected
+devices and remove them. If the devices can't be put into quiet state,
+they spew more traffic that is likely to cause another unexpected EEH
+error. This was observed on "p8dtu2u" machine:
+
+   0002:00:00.0 PCI bridge: IBM Device 03dc
+   0002:01:00.0 Ethernet controller: Intel Corporation \
+                Ethernet Controller X710/X557-AT 10GBASE-T (rev 02)
+   0002:01:00.1 Ethernet controller: Intel Corporation \
+                Ethernet Controller X710/X557-AT 10GBASE-T (rev 02)
+   0002:01:00.2 Ethernet controller: Intel Corporation \
+                Ethernet Controller X710/X557-AT 10GBASE-T (rev 02)
+   0002:01:00.3 Ethernet controller: Intel Corporation \
+                Ethernet Controller X710/X557-AT 10GBASE-T (rev 02)
+
+On P8 PowerNV platform, the IO path is frozen when shutdowning the
+devices, meaning the memory registers are inaccessible. It is why
+the devices can't be put into quiet state before removing them.
+This fixes the issue by enabling IO path prior to putting the devices
+into quiet state.
+
+Reported-by: Pridhiviraj Paidipeddi <ppaidipe@linux.vnet.ibm.com>
+Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
+Acked-by: Russell Currey <ruscur@russell.cc>
+Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
+Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/powerpc/kernel/eeh.c |   10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+--- a/arch/powerpc/kernel/eeh.c
++++ b/arch/powerpc/kernel/eeh.c
+@@ -304,9 +304,17 @@ void eeh_slot_error_detail(struct eeh_pe
+        *
+        * For pHyp, we have to enable IO for log retrieval. Otherwise,
+        * 0xFF's is always returned from PCI config space.
++       *
++       * When the @severity is EEH_LOG_PERM, the PE is going to be
++       * removed. Prior to that, the drivers for devices included in
++       * the PE will be closed. The drivers rely on working IO path
++       * to bring the devices to quiet state. Otherwise, PCI traffic
++       * from those devices after they are removed is like to cause
++       * another unexpected EEH error.
+        */
+       if (!(pe->type & EEH_PE_PHB)) {
+-              if (eeh_has_flag(EEH_ENABLE_IO_FOR_LOG))
++              if (eeh_has_flag(EEH_ENABLE_IO_FOR_LOG) ||
++                  severity == EEH_LOG_PERM)
+                       eeh_pci_enable(pe, EEH_OPT_THAW_MMIO);
+               /*
index e1e512406b64101b799fee4345e9e5ed0a2192c5..5b727abec0492893c9a65851cd780b2c3fd9503e 100644 (file)
@@ -49,3 +49,6 @@ bgmac-fix-reversed-test-of-build_skb-return-value.patch
 net-bgmac-fix-sof-bit-checking.patch
 net-bgmac-start-transmit-queue-in-bgmac_open.patch
 net-bgmac-remove-superflous-netif_carrier_on.patch
+powerpc-eeh-enable-io-path-on-permanent-error.patch
+gianfar-do-not-reuse-pages-from-emergency-reserve.patch
+btrfs-fix-truncate-down-when-no_holes-feature-is-enabled.patch