On Wed, Mar 05, 2014 at 04:18:12AM +0000, Fernandes, Joel wrote: > > > > On Mar 4, 2014, at 8:00 PM, "Herbert Xu" <herbert@xxxxxxxxxxxxxxxxxxx> wrote: > > > >> On Tue, Mar 04, 2014 at 12:30:54PM -0600, Joel Fernandes wrote: > >> HIGHMEM pages may not be mapped so we must kmap them before accessing. > >> This resolves a random OOPs error that was showing up during OpenSSL SHA tests. > >> > >> Signed-off-by: Joel Fernandes <joelf@xxxxxx> > >> Cc: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> > >> --- > >> v2 changes: > >> - don't check for HIGHMEM, kmap/kunmap do them anyway (Thanks Herbert). > >> > >> drivers/crypto/omap-sham.c | 8 +++++++- > >> 1 file changed, 7 insertions(+), 1 deletion(-) > >> > >> diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c > >> index e45aaaf..207eac1 100644 > >> --- a/drivers/crypto/omap-sham.c > >> +++ b/drivers/crypto/omap-sham.c > >> @@ -636,11 +636,17 @@ static size_t omap_sham_append_buffer(struct omap_sham_reqctx *ctx, > >> static size_t omap_sham_append_sg(struct omap_sham_reqctx *ctx) > >> { > >> size_t count; > >> + const u8 *vaddr; > >> > >> while (ctx->sg) { > >> + vaddr = kmap(sg_page(ctx->sg)); > > > > Are you sure you can safely use kmap here as opposed to kmap_atomic? > > Yes I made sure it is not called in interrupt context and also tested the patch. What about omap_sham_update => omap_sham_append_sg? As the former can be called in softirq context what is preventing it from calling kmap? Cheers, -- Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html