From: Joel A Fernandes Date: Tue, 26 Feb 2013 16:04:31 +0000 (-0600) Subject: crypto: omap-sham - Use pm_runtime_put instead of pm_runtime_put_sync in tasklet X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e68af48251ffb2a8aad4664ea68e0363893dda26;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git crypto: omap-sham - Use pm_runtime_put instead of pm_runtime_put_sync in tasklet After DMA is complete, the omap_sham_finish_req function is called as a part of the done_task tasklet. During this its atomic and any calls to pm functions should not assume they wont sleep. The patch replaces a call to pm_runtime_put_sync (which can sleep) with pm_runtime_put thus fixing a kernel panic observed on AM33xx SoC during SHA operation. Tested on an AM33xx SoC device (beaglebone board). To reproduce the problem, used the tcrypt kernel module as: modprobe tcrypt sec=2 mode=403 Signed-off-by: Joel A Fernandes Cc: David S. Miller Acked-by: Mark A. Greer Signed-off-by: Herbert Xu --- diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c index 3d1611f5aecf..1cfdea142b6b 100644 --- a/drivers/crypto/omap-sham.c +++ b/drivers/crypto/omap-sham.c @@ -923,7 +923,7 @@ static void omap_sham_finish_req(struct ahash_request *req, int err) dd->flags &= ~(BIT(FLAGS_BUSY) | BIT(FLAGS_FINAL) | BIT(FLAGS_CPU) | BIT(FLAGS_DMA_READY) | BIT(FLAGS_OUTPUT_READY)); - pm_runtime_put_sync(dd->dev); + pm_runtime_put(dd->dev); if (req->base.complete) req->base.complete(&req->base, err);