On Mon, Aug 05, 2024 at 11:27:13AM -0700, Eric Biggers wrote: > From: Eric Biggers <ebiggers@xxxxxxxxxx> > > On PREEMPT_RT, kfree() takes sleeping locks and must not be called with > preemption disabled. Therefore, on PREEMPT_RT skcipher_walk_done() must > not be called from within a kernel_fpu_{begin,end}() pair, even when > it's the last call which is guaranteed to not allocate memory. > > Therefore, move the last skcipher_walk_done() in gcm_crypt() to the end > of the function so that it goes after the kernel_fpu_end(). To make > this work cleanly, rework the data processing loop to handle only > non-last data segments. > > Fixes: b06affb1cb58 ("crypto: x86/aes-gcm - add VAES and AVX512 / AVX10 optimized AES-GCM") > Reported-by: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx> > Closes: https://lore.kernel.org/linux-crypto/20240802102333.itejxOsJ@xxxxxxxxxxxxx > Signed-off-by: Eric Biggers <ebiggers@xxxxxxxxxx> > --- > arch/x86/crypto/aesni-intel_glue.c | 59 ++++++++++++++---------------- > 1 file changed, 28 insertions(+), 31 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