summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2025-04-04 19:34:38 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2025-04-04 19:34:38 -0700
commita8662bcd2ff152bfbc751cab20f33053d74d0963 (patch)
treeb817ddbd0d2d20430955b7c7529909a95a01d1af
parentdd9db3bff8ec419ab0e5f18092f89a8fddc37f15 (diff)
parent12e0b15b1986736af8c64b920efad00c655a3c79 (diff)
downloadlinux-a8662bcd2ff152bfbc751cab20f33053d74d0963.tar.gz
linux-a8662bcd2ff152bfbc751cab20f33053d74d0963.tar.bz2
linux-a8662bcd2ff152bfbc751cab20f33053d74d0963.zip
Merge tag 'v6.15-p3' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Pull crypto fix from Herbert Xu: "This fixes a race condition in the newly added eip93 driver" * tag 'v6.15-p3' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: inside-secure/eip93 - acquire lock on eip93_put_descriptor hash
-rw-r--r--drivers/crypto/inside-secure/eip93/eip93-hash.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/crypto/inside-secure/eip93/eip93-hash.c b/drivers/crypto/inside-secure/eip93/eip93-hash.c
index 5e9627467a42..df1b05ac5a57 100644
--- a/drivers/crypto/inside-secure/eip93/eip93-hash.c
+++ b/drivers/crypto/inside-secure/eip93/eip93-hash.c
@@ -260,7 +260,8 @@ static int eip93_send_hash_req(struct crypto_async_request *async, u8 *data,
}
again:
- ret = eip93_put_descriptor(eip93, &cdesc);
+ scoped_guard(spinlock_irqsave, &eip93->ring->write_lock)
+ ret = eip93_put_descriptor(eip93, &cdesc);
if (ret) {
usleep_range(EIP93_RING_BUSY_DELAY,
EIP93_RING_BUSY_DELAY * 2);