Commit 4f3e797ad07d52d34983354a77b365dfcd48c1b4

Authored by Herbert Xu
1 parent 412e87ae5d

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: David S. Miller <davem@davemloft.net>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

Showing 1 changed file with 2 additions and 1 deletions Side-by-side Diff

crypto/scatterwalk.c
... ... @@ -54,7 +54,8 @@
54 54 struct page *page;
55 55  
56 56 page = sg_page(walk->sg) + ((walk->offset - 1) >> PAGE_SHIFT);
57   - flush_dcache_page(page);
  57 + if (!PageSlab(page))
  58 + flush_dcache_page(page);
58 59 }
59 60  
60 61 if (more) {