Commit 4f3e797a authored by Herbert Xu's avatar Herbert Xu

crypto: scatterwalk - Avoid flush_dcache_page on slab pages

It's illegal to call flush_dcache_page on slab pages on a number
of architectures.  So this patch avoids doing so if PageSlab is
true.

In future we can move the flush_dcache_page call to those page
cache users that actually need it.
Reported-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 412e87ae
...@@ -54,6 +54,7 @@ static void scatterwalk_pagedone(struct scatter_walk *walk, int out, ...@@ -54,6 +54,7 @@ static void scatterwalk_pagedone(struct scatter_walk *walk, int out,
struct page *page; struct page *page;
page = sg_page(walk->sg) + ((walk->offset - 1) >> PAGE_SHIFT); page = sg_page(walk->sg) + ((walk->offset - 1) >> PAGE_SHIFT);
if (!PageSlab(page))
flush_dcache_page(page); flush_dcache_page(page);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment