summaryrefslogtreecommitdiff
path: root/crypto/xts.c
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2009-01-28 14:09:59 +1100
committerHerbert Xu <herbert@gondor.apana.org.au>2009-01-28 14:09:59 +1100
commitf0113c0278dc0cf64214883a6ad9138587edeb7b (patch)
treedb04ad18e42f94b13fc19389cb3f125930d41321 /crypto/xts.c
parentcaea0bbd996a843c1a9e50a327c3c3dbd6aac534 (diff)
downloadlinux-crypto-f0113c0278dc0cf64214883a6ad9138587edeb7b.tar.gz
linux-crypto-f0113c0278dc0cf64214883a6ad9138587edeb7b.zip
crypto: api - Fix algorithm test race that broke aead initialisation
When we complete a test we'll notify everyone waiting on it, drop the mutex, and then remove the test larval (after reacquiring the mutex). If one of the notified parties tries to register another algorithm with the same driver name prior to the removal of the test larval, they will fail with EEXIST as only one algorithm of a given name can be tested at any time. This broke the initialisation of aead and givcipher algorithms as they will register two algorithms with the same driver name, in sequence. This patch fixes the problem by marking the larval as dead before we drop the mutex, and also ignoring all dead or dying algorithms on the registration path. Tested-by: Andreas Steffen <andreas.steffen@strongswan.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/xts.c')
0 files changed, 0 insertions, 0 deletions