]> www.infradead.org Git - users/jedix/linux-maple.git/commit
crypto: skcipher - fix mismatch between mapping and unmapping order
authorEric Biggers <ebiggers@google.com>
Thu, 6 Mar 2025 03:33:05 +0000 (19:33 -0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sat, 8 Mar 2025 08:24:36 +0000 (16:24 +0800)
commiteca6828403b80343647de39d4782ee56cc9e36dd
treef0d7728af0df229e9a7d595f417e01ee17a1ff2e
parent98330b9a61506de7df0d1725122111909c157864
crypto: skcipher - fix mismatch between mapping and unmapping order

Local kunmaps have to be unmapped in the opposite order from which they
were mapped.  My recent change flipped the unmap order in the
SKCIPHER_WALK_DIFF case.  Adjust the mapping side to match.

This fixes a WARN_ON_ONCE that was triggered when running the
crypto-self tests on a 32-bit kernel with
CONFIG_DEBUG_KMAP_LOCAL_FORCE_MAP=y.

Fixes: 95dbd711b1d8 ("crypto: skcipher - use the new scatterwalk functions")
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/skcipher.c