From: Herbert Xu Date: Wed, 18 Feb 2009 12:33:55 +0000 (+0800) Subject: crypto: skcipher - Avoid infinite loop when cipher fails selftest X-Git-Tag: v2.6.30-rc1~677^2~15 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b170a137f467ea951c3f256da1b911545acf3ffd;p=pandora-kernel.git crypto: skcipher - Avoid infinite loop when cipher fails selftest When an skcipher constructed through crypto_givcipher_default fails its selftest, we'll loop forever trying to construct new skcipher objects but failing because it already exists. The crux of the issue is that once a givcipher fails the selftest, we'll ignore it on the next run through crypto_skcipher_lookup and attempt to construct a new givcipher. We should instead return an error to the caller if we find a givcipher that has failed the test. Signed-off-by: Herbert Xu --- Reading git-diff-tree failed