diff options
author | VanGiang Nguyen <vangiang.nguyen@rohde-schwarz.com> | 2024-08-09 08:21:42 +0200 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2024-08-17 07:55:50 +0200 |
commit | 9a22b2812393d93d84358a760c347c21939029a6 (patch) | |
tree | c2ecded39607917d856f62aa19ce8d71b31a06d0 /arch/arm/crypto | |
parent | crypto: nx - Use static_assert() to check struct sizes (diff) | |
download | linux-9a22b2812393d93d84358a760c347c21939029a6.tar.xz linux-9a22b2812393d93d84358a760c347c21939029a6.zip |
padata: use integer wrap around to prevent deadlock on seq_nr overflow
When submitting more than 2^32 padata objects to padata_do_serial, the
current sorting implementation incorrectly sorts padata objects with
overflowed seq_nr, causing them to be placed before existing objects in
the reorder list. This leads to a deadlock in the serialization process
as padata_find_next cannot match padata->seq_nr and pd->processed
because the padata instance with overflowed seq_nr will be selected
next.
To fix this, we use an unsigned integer wrap around to correctly sort
padata objects in scenarios with integer overflow.
Fixes: bfde23ce200e ("padata: unbind parallel jobs from specific CPUs")
Cc: <stable@vger.kernel.org>
Co-developed-by: Christian Gafert <christian.gafert@rohde-schwarz.com>
Signed-off-by: Christian Gafert <christian.gafert@rohde-schwarz.com>
Co-developed-by: Max Ferger <max.ferger@rohde-schwarz.com>
Signed-off-by: Max Ferger <max.ferger@rohde-schwarz.com>
Signed-off-by: Van Giang Nguyen <vangiang.nguyen@rohde-schwarz.com>
Acked-by: Daniel Jordan <daniel.m.jordan@oracle.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'arch/arm/crypto')
0 files changed, 0 insertions, 0 deletions