From patchwork Thu Dec 10 16:06:59 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Protsenko X-Patchwork-Id: 58225 Delivered-To: patch@linaro.org Received: by 10.112.147.194 with SMTP id tm2csp586334lbb; Thu, 10 Dec 2015 08:07:06 -0800 (PST) X-Received: by 10.98.87.16 with SMTP id l16mr7916872pfb.80.1449763625986; Thu, 10 Dec 2015 08:07:05 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id uz8si21089442pac.13.2015.12.10.08.07.05 for ; Thu, 10 Dec 2015 08:07:05 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dkim=neutral (body hash did not verify) header.i=@linaro-org.20150623.gappssmtp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750862AbbLJQHE (ORCPT ); Thu, 10 Dec 2015 11:07:04 -0500 Received: from mail-lf0-f43.google.com ([209.85.215.43]:35633 "EHLO mail-lf0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750790AbbLJQHD (ORCPT ); Thu, 10 Dec 2015 11:07:03 -0500 Received: by lfdl133 with SMTP id l133so59761236lfd.2 for ; Thu, 10 Dec 2015 08:07:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=sXPjPa3yyooG1j+QphM2FUKVelqaO7nwROjV5i18ZyY=; b=z6nrj+7kAArLV5tYj1WV6Yy9hUKaTLcCUJeZtPEyNxXNFNK3IGvufHK+6umzN10N82 g1m1g06BjfvzHTahKeWZf/5FMuxKVh527DukAbx/39BinnpGR30gdT46q7D3kKHFNCLt vlXkBqZ6xhPfVkdtMQGl2tyrIXWKPVVr8D0spIG7BwOW/N410D/843/oMcVFyQGuChYN TpBfkuKnzuZTuiexKvBMzy0sc10/mfLW6dHi/mIpP5g6FBcVEhxzbMXYgCH6UjaeyC8q p+bmQn4uglaV6+4OIMogPQk9wztw1+R1fZoUNddP8aJbPp+lDEWwum4F2SCYvFqGlvof 0nCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=sXPjPa3yyooG1j+QphM2FUKVelqaO7nwROjV5i18ZyY=; b=XTCFXAmR1220JkLG47FEhJgOkxyOflZgpJ/ENwhVjk56tBWBWa3OR8Uu7599Nw7BpW 4gihyzuXMem1LslCZdTrtVl2SJ61+amfinkdQNUu1MofFnbxOAiaQwvdHDYfaAGsW+4F 5df3oLc0V1goXNVjcpxOUZZgc+Nx/93kKkxrkaHxY/5C5TOgdx6BzPPcwn2TcRHoHpTY 9uSuVf2BgEsxAvqHMmIa58dk3CQiSLYf9vpYKbuCx00JhCNELKGkrEtE2yvLBta5G696 +Fe6ZgRYZmakzieIVr/YOg4mIdWoDo49ALIAmXUUWxUCtiO/2f3A5QsM/whMQW5ZJmnf LAzA== X-Gm-Message-State: ALoCoQk/tDxITJxtOQWKsxsIJy/fu4keYnaTdj1GAbUblu94T1MyS5A2HEkKLSqlJFGhob7UbrUbopDUqZSfwYSN6di7LsEQNQ== X-Received: by 10.25.138.136 with SMTP id m130mr5639079lfd.2.1449763620930; Thu, 10 Dec 2015 08:07:00 -0800 (PST) Received: from localhost ([195.238.93.36]) by smtp.gmail.com with ESMTPSA id 42sm2495110lfv.29.2015.12.10.08.06.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 10 Dec 2015 08:07:00 -0800 (PST) From: Semen Protsenko To: Herbert Xu , "David S . Miller" Cc: linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, Grygorii Strashko Subject: [PATCH] crypto: omap-des: Fix "schedule while atomic" bug Date: Thu, 10 Dec 2015 18:06:59 +0200 Message-Id: <1449763619-11883-1-git-send-email-semen.protsenko@linaro.org> X-Mailer: git-send-email 2.6.2 Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org 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(+) -- 2.6.2 -- To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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);