Linux cryptographic layer development
 help / color / mirror / Atom feed
From: "Mark A. Greer" <mgreer@animalcreek.com>
To: agnel.joel@gmail.com
Cc: linux-crypto@vger.kernel.org, Joel A Fernandes <joelagnel@ti.com>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	"David S. Miller" <davem@davemloft.net>
Subject: Re: [PATCH v3 1/2] omap-sham: Use pm_runtime_put instead of pm_runtime_put_sync in tasklet
Date: Tue, 26 Feb 2013 16:06:13 -0700	[thread overview]
Message-ID: <20130226230613.GC13338@animalcreek.com> (raw)
In-Reply-To: <1361894672-10431-1-git-send-email-agnel.joel@gmail.com>

On Tue, Feb 26, 2013 at 10:04:31AM -0600, agnel.joel@gmail.com wrote:
> From: Joel A Fernandes <joelagnel@ti.com>
> 
> 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 <joelagnel@ti.com>
> Cc: Herbert Xu <herbert@gondor.apana.org.au>
> Cc: David S. Miller <davem@davemloft.net>
> Cc: Mark A. Greer <mgreer@animalcreek.com>
> ---
>  drivers/crypto/omap-sham.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c
> index edff981..b8bb583 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);

Acked-by: Mark A. Greer <mgreer@animalcreek.com>

      parent reply	other threads:[~2013-02-26 23:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-26 16:04 [PATCH v3 1/2] omap-sham: Use pm_runtime_put instead of pm_runtime_put_sync in tasklet agnel.joel
2013-02-26 16:04 ` [PATCH v3 2/2] omap-aes: " agnel.joel
2013-02-26 23:06   ` Mark A. Greer
2013-03-10 10:15     ` Herbert Xu
2013-02-26 23:06 ` Mark A. Greer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130226230613.GC13338@animalcreek.com \
    --to=mgreer@animalcreek.com \
    --cc=agnel.joel@gmail.com \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=joelagnel@ti.com \
    --cc=linux-crypto@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox