]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Sep 2013 23:47:29 +0000 (16:47 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Sep 2013 23:47:29 +0000 (16:47 -0700)
added patches:
perf-tools-handle-jited-code-in-shared-memory.patch
sfc-Fix-efx_rx_buf_offset-for-recycled-pages-3.4.patch

queue-3.4/perf-tools-handle-jited-code-in-shared-memory.patch [new file with mode: 0644]
queue-3.4/series
queue-3.4/sfc-Fix-efx_rx_buf_offset-for-recycled-pages-3.4.patch [new file with mode: 0644]

diff --git a/queue-3.4/perf-tools-handle-jited-code-in-shared-memory.patch b/queue-3.4/perf-tools-handle-jited-code-in-shared-memory.patch
new file mode 100644 (file)
index 0000000..5b1a524
--- /dev/null
@@ -0,0 +1,33 @@
+From 89365e6c9ad4c0e090e4c6a4b67a3ce319381d89 Mon Sep 17 00:00:00 2001
+From: Andi Kleen <ak@linux.intel.com>
+Date: Wed, 24 Apr 2013 17:03:02 -0700
+Subject: perf tools: Handle JITed code in shared memory
+
+From: Andi Kleen <ak@linux.intel.com>
+
+commit 89365e6c9ad4c0e090e4c6a4b67a3ce319381d89 upstream.
+
+Need to check for /dev/zero.
+
+Most likely more strings are missing too.
+
+Signed-off-by: Andi Kleen <ak@linux.intel.com>
+Link: http://lkml.kernel.org/r/1366848182-30449-1-git-send-email-andi@firstfloor.org
+Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
+Cc: Vinson Lee <vlee@freedesktop.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ tools/perf/util/map.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/tools/perf/util/map.c
++++ b/tools/perf/util/map.c
+@@ -16,6 +16,7 @@ const char *map_type__name[MAP__NR_TYPES
+ static inline int is_anon_memory(const char *filename)
+ {
+       return !strcmp(filename, "//anon") ||
++             !strcmp(filename, "/dev/zero (deleted)") ||
+              !strcmp(filename, "/anon_hugepage (deleted)");
+ }
index e5b75a98fa6ec4cb2fb6579a12309b6598b21704..e00db5ffcd8328031b8b28067f5254da6241de43 100644 (file)
@@ -17,3 +17,5 @@ cgroup-fail-if-monitored-file-and-event_control-are-in-different-cgroup.patch
 perf-clarify-perf_cpu_context-active_pmu-usage-by-renaming.patch
 perf-fix-perf_cgroup_switch-for-sw-events.patch
 fanotify-dont-merge-permission-events.patch
+perf-tools-handle-jited-code-in-shared-memory.patch
+sfc-Fix-efx_rx_buf_offset-for-recycled-pages-3.4.patch
diff --git a/queue-3.4/sfc-Fix-efx_rx_buf_offset-for-recycled-pages-3.4.patch b/queue-3.4/sfc-Fix-efx_rx_buf_offset-for-recycled-pages-3.4.patch
new file mode 100644 (file)
index 0000000..9da2c25
--- /dev/null
@@ -0,0 +1,44 @@
+From 55961f9a914e637f143da275da42154a49c9743a Mon Sep 17 00:00:00 2001
+From: Ben Hutchings <bhutchings@solarflare.com>
+Date: Fri, 6 Sep 2013 22:39:20 +0100
+Subject: sfc: Fix efx_rx_buf_offset() for recycled pages
+
+From: Ben Hutchings <bhutchings@solarflare.com>
+
+This bug fix is only for stable branches older than 3.10.  The bug was
+fixed upstream by commit 2768935a4660 ('sfc: reuse pages to avoid DMA
+mapping/unmapping costs'), but that change is totally unsuitable for
+stable.
+
+Commit b590ace09d51 ('sfc: Fix efx_rx_buf_offset() in the presence of
+swiotlb') added an explicit page_offset member to struct
+efx_rx_buffer, which must be set consistently with the u.page and
+dma_addr fields.  However, it failed to add the necessary assignment
+in efx_resurrect_rx_buffer().  It also did not correct the calculation
+of efx_rx_buffer::dma_addr in efx_resurrect_rx_buffer(), which assumes
+that DMA-mapping a page will result in a page-aligned DMA address
+(exactly what swiotlb violates).
+
+Add the assignment of efx_rx_buffer::page_offset and change the
+calculation of dma_addr to make use of it.
+
+Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
+Acked-by: David Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/ethernet/sfc/rx.c |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/drivers/net/ethernet/sfc/rx.c
++++ b/drivers/net/ethernet/sfc/rx.c
+@@ -311,8 +311,9 @@ static void efx_resurrect_rx_buffer(stru
+       index = rx_queue->added_count & rx_queue->ptr_mask;
+       new_buf = efx_rx_buffer(rx_queue, index);
+-      new_buf->dma_addr = rx_buf->dma_addr ^ (PAGE_SIZE >> 1);
+       new_buf->u.page = rx_buf->u.page;
++      new_buf->page_offset = rx_buf->page_offset ^ (PAGE_SIZE >> 1);
++      new_buf->dma_addr = state->dma_addr + new_buf->page_offset;
+       new_buf->len = rx_buf->len;
+       new_buf->flags = EFX_RX_BUF_PAGE;
+       ++rx_queue->added_count;