diff options
author | Sebastian Siewior <linux-crypto@ml.breakpoint.cc> | 2007-06-22 19:47:35 +0800 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2007-07-11 20:58:55 +0800 |
commit | f8a5b0a7fe731146f50804c7f37abb94f3d6871d (patch) | |
tree | 24a7df5ed441cca66fd8824e0d8793023a41ba52 /crypto | |
parent | 20b25bb420c3a03443b1ebf62c2228a9f923bd3a (diff) | |
download | linux-crypto-f8a5b0a7fe731146f50804c7f37abb94f3d6871d.tar.gz linux-crypto-f8a5b0a7fe731146f50804c7f37abb94f3d6871d.zip |
[CRYPTO] api: Allow ablkcipher with no queues
Evgeniy's hifn driver and probably mine don't use ablkcipher->queue at all.
The show method of ablkcipher will access this field without checking if it
is valid.
Signed-off-by: Sebastian Siewior <linux-crypto@ml.breakpoint.cc>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/ablkcipher.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/crypto/ablkcipher.c b/crypto/ablkcipher.c index d45fa16d..1c166b47 100644 --- a/crypto/ablkcipher.c +++ b/crypto/ablkcipher.c @@ -91,8 +91,10 @@ static void crypto_ablkcipher_show(struct seq_file *m, struct crypto_alg *alg) seq_printf(m, "min keysize : %u\n", ablkcipher->min_keysize); seq_printf(m, "max keysize : %u\n", ablkcipher->max_keysize); seq_printf(m, "ivsize : %u\n", ablkcipher->ivsize); - seq_printf(m, "qlen : %u\n", ablkcipher->queue->qlen); - seq_printf(m, "max qlen : %u\n", ablkcipher->queue->max_qlen); + if (ablkcipher->queue) { + seq_printf(m, "qlen : %u\n", ablkcipher->queue->qlen); + seq_printf(m, "max qlen : %u\n", ablkcipher->queue->max_qlen); + } } const struct crypto_type crypto_ablkcipher_type = { |