Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757912AbbEWMSN (ORCPT ); Sat, 23 May 2015 08:18:13 -0400 Received: from mail-wg0-f41.google.com ([74.125.82.41]:34712 "EHLO mail-wg0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752639AbbEWMSK (ORCPT ); Sat, 23 May 2015 08:18:10 -0400 Message-ID: <55606FFE.4000902@gmail.com> Date: Sat, 23 May 2015 14:18:06 +0200 From: Corentin LABBE User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: herbert@gondor.apana.org.au CC: robh+dt@kernel.org, pawel.moll@arm.com, mark.rutland@arm.com, ijc+devicetree@hellion.org.uk, galak@codeaurora.org, maxime.ripard@free-electrons.com, linux@arm.linux.org.uk, davem@davemloft.net, akpm@linux-foundation.org, gregkh@linuxfoundation.org, mchehab@osg.samsung.com, joe@perches.com, tj@kernel.org, arnd@arndb.de, boris.brezillon@free-electrons.com, devicetree@vger.kernel.org, linux-doc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org, linux-sunxi@googlegroups.com Subject: Re: [linux-sunxi] Re: [PATCH v9 4/4] crypto: Add Allwinner Security System crypto accelerator References: <1431608341-10936-1-git-send-email-clabbe.montjoie@gmail.com> <1431608341-10936-5-git-send-email-clabbe.montjoie@gmail.com> <20150515064932.GB16704@gondor.apana.org.au> In-Reply-To: <20150515064932.GB16704@gondor.apana.org.au> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 776 Lines: 25 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/