Re: [PATCH] padata: upgrade smp_mb__after_atomic to smp_mb in padata_do_serial

From: Herbert Xu
Date: Thu Jun 18 2020 - 03:57:50 EST


On Mon, Jun 08, 2020 at 05:26:52PM -0400, Daniel Jordan wrote:
> A 5.7 kernel hangs during a tcrypt test of padata that waits for an AEAD
> request to finish. This is only seen on large machines running many
> concurrent requests.
>
> The issue is that padata never serializes the request. The removal of
> the reorder_objects atomic missed that the memory barrier in
> padata_do_serial() depends on it.
>
> Upgrade the barrier from smp_mb__after_atomic to smp_mb to get correct
> ordering again.
>
> Fixes: 3facced7aeed1 ("padata: remove reorder_objects")
> Signed-off-by: Daniel Jordan <daniel.m.jordan@xxxxxxxxxx>
> Cc: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
> Cc: Steffen Klassert <steffen.klassert@xxxxxxxxxxx>
> Cc: linux-crypto@xxxxxxxxxxxxxxx
> Cc: linux-kernel@xxxxxxxxxxxxxxx
> ---
> kernel/padata.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)

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