]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
crypto: authenc - Correctly pass EINPROGRESS back up to the caller
authorHerbert Xu <herbert@gondor.apana.org.au>
Wed, 24 Sep 2025 10:20:17 +0000 (18:20 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 17 Oct 2025 08:03:58 +0000 (16:03 +0800)
commit96feb73def02d175850daa0e7c2c90c876681b5c
tree36063e3d789340f4b12307ec6779c02dbdd8374d
parent6f6e309328d53a10c0fe1f77dec2db73373179b6
crypto: authenc - Correctly pass EINPROGRESS back up to the caller

When authenc is invoked with MAY_BACKLOG, it needs to pass EINPROGRESS
notifications back up to the caller when the underlying algorithm
returns EBUSY synchronously.

However, if the EBUSY comes from the second part of an authenc call,
i.e., it is asynchronous, both the EBUSY and the subsequent EINPROGRESS
notification must not be passed to the caller.

Implement this by passing a mask to the function that starts the
second half of authenc and using it to determine whether EBUSY
and EINPROGRESS should be passed to the caller.

This was a deficiency in the original implementation of authenc
because it was not expected to be used with MAY_BACKLOG.

Reported-by: Ingo Franzki <ifranzki@linux.ibm.com>
Reported-by: Mikulas Patocka <mpatocka@redhat.com>
Fixes: 180ce7e81030 ("crypto: authenc - Add EINPROGRESS check")
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/authenc.c