crypto: caam - fix printk recursion for long error texts
authorKim Phillips <kim.phillips@freescale.com>
Mon, 2 May 2011 23:29:17 +0000 (18:29 -0500)
committerHerbert Xu <herbert@gondor.apana.org.au>
Wed, 4 May 2011 05:15:06 +0000 (15:15 +1000)
during recent descriptor development, an Invalid Sequence Command
error triggered a:

BUG: recent printk recursion!

due to insufficient memory allocated for the error text.

The Invalid Sequence Command error text is the longest.
The length of the maximum error string is computed as
the sum of:

"DECO: ": 6
"jump tgt desc idx 255: ": 23
Invalid Sequence Command text: 272
zero termination character: 1

i.e, 302 characters.

Define this maximum error string length in error.h and fix
caam_jr_strstatus callsites.

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/caam/caamalg.c
drivers/crypto/caam/error.h

Simple merge
Simple merge