[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20131115220529.GA3160@ls3530.box>
Date: Fri, 15 Nov 2013 23:05:29 +0100
From: Helge Deller <deller@....de>
To: Benjamin LaHaise <bcrl@...ck.org>, linux-aio@...ck.org,
linux-kernel@...r.kernel.org, linux-parisc@...r.kernel.org,
James Bottomley <James.Bottomley@...senPartnership.com>
Subject: [PATCH] aio: fix D-cache aliasing issues
When a user page mapping is released via kunmap*() functions, the D-cache needs
to be flushed via flush_dcache_page() to avoid D-cache aliasing issues.
This patch fixes aio on the parisc platform (and probably others).
Signed-off-by: Helge Deller <deller@....de>
To: Benjamin LaHaise <bcrl@...ck.org>
To: linux-aio@...ck.org
Cc: stable@...r.kernel.org # 3.12+
diff --git a/fs/aio.c b/fs/aio.c
index 823efcb..2181821 100644
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -514,6 +514,7 @@ static void free_ioctx(struct work_struct *work)
atomic_add(avail, &ctx->reqs_available);
ring->head = ring->tail;
kunmap_atomic(ring);
+ flush_dcache_page(ctx->ring_pages[0]);
if (atomic_read(&ctx->reqs_available) >= ctx->nr_events - 1)
break;
@@ -568,6 +569,7 @@ static int ioctx_add_table(struct kioctx *ctx, struct mm_struct *mm)
ring = kmap_atomic(ctx->ring_pages[0]);
ring->id = ctx->id;
kunmap_atomic(ring);
+ flush_dcache_page(ctx->ring_pages[0]);
return 0;
}
@@ -1032,6 +1034,7 @@ static long aio_read_events_ring(struct kioctx *ctx,
head = ring->head;
tail = ring->tail;
kunmap_atomic(ring);
+ flush_dcache_page(ctx->ring_pages[0]);
pr_debug("h%u t%u m%u\n", head, tail, ctx->nr_events);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists