From: Sam Protsenko Subject: Re: [PATCH] crypto: omap-des: Fix "schedule while atomic" bug Date: Thu, 10 Dec 2015 18:51:39 +0200 Message-ID: References: <1449763619-11883-1-git-send-email-semen.protsenko@linaro.org> Reply-To: semen.protsenko@globallogic.com Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Cc: Herbert Xu , "David S . Miller" , linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, Grygorii Strashko , Lokesh Vutla , linux-omap To: Semen Protsenko Return-path: Received: from mail-lb0-f182.google.com ([209.85.217.182]:36519 "EHLO mail-lb0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752186AbbLJQvk (ORCPT ); Thu, 10 Dec 2015 11:51:40 -0500 Received: by lbblt2 with SMTP id lt2so55305789lbb.3 for ; Thu, 10 Dec 2015 08:51:39 -0800 (PST) In-Reply-To: <1449763619-11883-1-git-send-email-semen.protsenko@linaro.org> Sender: linux-crypto-owner@vger.kernel.org List-ID: + Lokesh Vutla + linux-omap@vger.kernel.org On Thu, Dec 10, 2015 at 6:06 PM, Semen Protsenko wrote: > > From: Sam Protsenko > > When using DES module the next bug appears: > > BUG: scheduling while atomic: kworker/0:1/63/0x00000102 > > With backtrace as follows: > > <<<<<<<<<<<<<<<<<<<<<<<<<<<<<< cut here >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> > > [] (dump_backtrace) from [] (show_stack+0x18/0x1c) > [] (show_stack) from [] (dump_stack+0x84/0xc4) > [] (dump_stack) from [] (__schedule_bug+0x54/0x64) > [] (__schedule_bug) from [] (__schedule+0x4ac/0x53c) > [] (__schedule) from [] (schedule+0x38/0x88) > [] (schedule) from [] (rpm_resume+0x158/0x59c) > [] (rpm_resume) from [] (__pm_runtime_resume+0x54/0x6c) > [] (__pm_runtime_resume) from [] (omap_des_handle_queue+0x154/0x7bc) > [] (omap_des_handle_queue) from [] (omap_des_crypt+0x58/0xbc) > [] (omap_des_crypt) from [] (omap_des_cbc_decrypt+0x14/0x18) > [] (omap_des_cbc_decrypt) from [] (authenc_verify_ahash_done+0xe0/0xe8) > [] (authenc_verify_ahash_done) from [] (omap_sham_finish_req+0x58/0xa8) > [] (omap_sham_finish_req) from [] (omap_sham_done_task+0x1c0/0x1e0) > [] (omap_sham_done_task) from [] (tasklet_action+0x80/0x118) > [] (tasklet_action) from [] (__do_softirq+0x11c/0x260) > [] (__do_softirq) from [] (irq_exit+0xc0/0xfc) > [] (irq_exit) from [] (handle_IRQ+0x4c/0x98) > [] (handle_IRQ) from [] (gic_handle_irq+0x34/0x64) > [] (gic_handle_irq) from [] (__irq_svc+0x40/0x70) > > <<<<<<<<<<<<<<<<<<<<<<<<<<<<<< cut here >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> > > Insight was seen in drivers/crypto/omap-sham.c driver. > All credits for this patch go to Grygorii Strashko. > > Signed-off-by: Sam Protsenko > --- > drivers/crypto/omap-des.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/crypto/omap-des.c b/drivers/crypto/omap-des.c > index 0a70e46..db1ef28 100644 > --- a/drivers/crypto/omap-des.c > +++ b/drivers/crypto/omap-des.c > @@ -1086,6 +1086,7 @@ static int omap_des_probe(struct platform_device *pdev) > dd->phys_base = res->start; > > pm_runtime_enable(dev); > + pm_runtime_irq_safe(dev); > err = pm_runtime_get_sync(dev); > if (err < 0) { > pm_runtime_put_noidle(dev); > -- > 2.6.2 > > -- > 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/