Skip to content

Commit e04ec0d

Browse files
danieljordan10herbertx
authored andcommitted
padata: upgrade smp_mb__after_atomic to smp_mb in padata_do_serial
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: 3facced ("padata: remove reorder_objects") Signed-off-by: Daniel Jordan <[email protected]> Cc: Steffen Klassert <[email protected]> Cc: [email protected] Cc: <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
1 parent 34c86f4 commit e04ec0d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

kernel/padata.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ static void padata_reorder(struct parallel_data *pd)
335335
*
336336
* Ensure reorder queue is read after pd->lock is dropped so we see
337337
* new objects from another task in padata_do_serial. Pairs with
338-
* smp_mb__after_atomic in padata_do_serial.
338+
* smp_mb in padata_do_serial.
339339
*/
340340
smp_mb();
341341

@@ -418,7 +418,7 @@ void padata_do_serial(struct padata_priv *padata)
418418
* with the trylock of pd->lock in padata_reorder. Pairs with smp_mb
419419
* in padata_reorder.
420420
*/
421-
smp_mb__after_atomic();
421+
smp_mb();
422422

423423
padata_reorder(pd);
424424
}

0 commit comments

Comments
 (0)