projects/linux·commit a8662bcd

Merge tag 'v6.15-p3' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6

a8662bcd · Linus Torvalds <[email protected]> · 2025-04-04 19:34:38 -07:00

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
Commit
a8662bcd2ff152bfbc751cab20f33053d74d0963
Parents
dd9db3bf · 12e0b15b

Merge commit. Changes below are compared with the first parent: dd9db3bf.

Changes

1 files changed · +2 −1

FileStatusAddDelContent
drivers/crypto/inside-secure/eip93/eip93-hash.cmodified+2−1View file

drivers/crypto/inside-secure/eip93/eip93-hash.c

View file
diff --git a/drivers/crypto/inside-secure/eip93/eip93-hash.c b/drivers/crypto/inside-secure/eip93/eip93-hash.c
index 5e96274..df1b05a 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);