Re: [linux-sunxi] Re: [PATCH v9 4/4] crypto: Add Allwinner Security System crypto accelerator

From: Corentin LABBE
Date: Sat May 23 2015 - 08:18:32 EST


Le 15/05/2015 08:49, Herbert Xu a Ãcrit :
> On Thu, May 14, 2015 at 02:59:01PM +0200, LABBE Corentin wrote:
>>
>> + err = crypto_ablkcipher_setkey(op->fallback, kkey, op->keylen);
>> + if (err != 0) {
>> + dev_err(ss->dev, "Cannot set key on fallback\n");
>> + return -EINVAL;
>> + }
>
> You cannot call setkey from an atomic context. The easiest solution
> is to call setkey in your setkey function instead.
>
> Cheers,
>
Fixed

What do you think about adding a BUG_ON(in_atomic()) in crypto_ablkcipher_setkey() ?

Thanks

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/