linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Herbert Xu <herbert@gondor.apana.org.au>
To: Tudor.Ambarus@microchip.com
Cc: alexandre.belloni@bootlin.com, Ludovic.Desroches@microchip.com,
	linux-arm-kernel@lists.infradead.org,
	linux-crypto@vger.kernel.org
Subject: Re: [PATCH 1/5] crypto: atmel-{aes,sha} - Fix incorrect use of dmaengine_terminate_all()
Date: Fri, 20 Dec 2019 15:07:44 +0800	[thread overview]
Message-ID: <20191220070744.zovhmup6bbeunlzr@gondor.apana.org.au> (raw)
In-Reply-To: <20191213095423.6687-1-tudor.ambarus@microchip.com>

On Fri, Dec 13, 2019 at 09:54:42AM +0000, Tudor.Ambarus@microchip.com wrote:
> From: Tudor Ambarus <tudor.ambarus@microchip.com>
> 
> device_terminate_all() is used to abort all the pending and
> ongoing transfers on the channel, it should be used just in the
> error path.
> 
> Also, dmaengine_terminate_all() is deprecated and one should use
> dmaengine_terminate_async() or dmaengine_terminate_sync(). The method
> is not used in atomic context, use dmaengine_terminate_sync().
> 
> A secondary aspect of this patch is that it luckily avoids a deadlock
> between atmel_aes and at_hdmac.c. While in tasklet with the lock held,
> the dma controller invokes the client callback (dmaengine_terminate_all),
> which tries to get the same lock. The at_hdmac fix would be to drop the
> lock before invoking the client callback, a fix on at_hdmac will follow.
> 
> Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
> ---
>  drivers/crypto/atmel-aes.c | 32 ++------------------------------
>  drivers/crypto/atmel-sha.c |  1 -
>  2 files changed, 2 insertions(+), 31 deletions(-)

All applied.  Thanks.
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

      parent reply	other threads:[~2019-12-20  7:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-13  9:54 [PATCH 1/5] crypto: atmel-{aes,sha} - Fix incorrect use of dmaengine_terminate_all() Tudor.Ambarus
2019-12-13  9:54 ` [PATCH 2/5] crypto: atmel-{aes,sha,tdes} - Drop duplicate init of dma_slave_config.direction Tudor.Ambarus
2019-12-13  9:54 ` [PATCH 3/5] crypto: atmel-{aes,sha,tdes} - Stop passing unused argument in _dma_init() Tudor.Ambarus
2019-12-13  9:54 ` [PATCH 4/5] crypto: atmel-{sha,tdes} - Print warn message even when deferring Tudor.Ambarus
2019-12-13  9:54 ` [PATCH 5/5] crypto: atmel-{aes, tdes} - Update the IV only when the op succeeds Tudor.Ambarus
2019-12-20  7:07 ` Herbert Xu [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=20191220070744.zovhmup6bbeunlzr@gondor.apana.org.au \
    --to=herbert@gondor.apana.org.au \
    --cc=Ludovic.Desroches@microchip.com \
    --cc=Tudor.Ambarus@microchip.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --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;
as well as URLs for NNTP newsgroup(s).