]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
[CRYPTO]: Added CRYPTO_TFM_REQ_MAY_SLEEP flag
authorHerbert Xu <herbert@gondor.apana.org.au>
Fri, 2 Sep 2005 00:43:05 +0000 (17:43 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 2 Sep 2005 00:43:05 +0000 (17:43 -0700)
commit64baf3cfea974d2b9e671ccfdbc03e030ea5ebc6
tree2bae23bf3d7378ba2d60be8aee6b0178d1d9c721
parentfb4f10ed50f01b0f953068456bfb6e2885921b01
[CRYPTO]: Added CRYPTO_TFM_REQ_MAY_SLEEP flag

The crypto layer currently uses in_atomic() to determine whether it is
allowed to sleep.  This is incorrect since spin locks don't always cause
in_atomic() to return true.

Instead of that, this patch returns to an earlier idea of a per-tfm flag
which determines whether sleeping is allowed.  Unlike the earlier version,
the default is to not allow sleeping.  This ensures that no existing code
can break.

As usual, this flag may either be set through crypto_alloc_tfm(), or
just before a specific crypto operation.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
crypto/api.c
crypto/cipher.c
crypto/internal.h
include/linux/crypto.h