Skip to contentSkip to conversation

crypto: inside-secure/eip93 - fix kernel panic in driver detach

PATCH In review Aleksander Jan Bajkowski 3 participants 3 messages Dec 30, 2025 – Jan 23

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 crypto: inside-secure/eip93 - fix kernel panic in driver detach

During driver detach, the same hash algorithm is unregistered multiple times due to a wrong iterator.

Fixes 9739f5f93b78 ("crypto: eip93 - Add Inside Secure SafeXcel EIP-93 crypto engine support")
---
 drivers/crypto/inside-secure/eip93/eip93-main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/crypto/inside-secure/eip93/eip93-main.c +1 -1
index 0b38a567da0e..3cdc3308dcac 100644
@@ -90,7 +90,7 @@ static void eip93_unregister_algs(unsigned int i)
 			crypto_unregister_aead(&eip93_algs[j]->alg.aead);
 			break;
 		case EIP93_ALG_TYPE_HASH:
-			crypto_unregister_ahash(&eip93_algs[i]->alg.ahash);
+			crypto_unregister_ahash(&eip93_algs[j]->alg.ahash);
 			break;
 		}
 	}
Signature · 1 line
2.47.3
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · Aleksander Jan Bajkowski

During driver detach, the same hash algorithm is unregistered multiple times due to a wrong iterator.

Fixes 9739f5f93b78 ("crypto: eip93 - Add Inside Secure SafeXcel EIP-93 crypto engine support")

Thanks!

Quoted 20 lines
---
 drivers/crypto/inside-secure/eip93/eip93-main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/crypto/inside-secure/eip93/eip93-main.c +1 -1
index 0b38a567da0e..3cdc3308dcac 100644
@@ -90,7 +90,7 @@ static void eip93_unregister_algs(unsigned int i)
 			crypto_unregister_aead(&eip93_algs[j]->alg.aead);
 			break;
 		case EIP93_ALG_TYPE_HASH:
-			crypto_unregister_ahash(&eip93_algs[i]->alg.ahash);
+			crypto_unregister_ahash(&eip93_algs[j]->alg.ahash);
 			break;
 		}
 	}
Signature · 1 line
2.47.3
maintainer
#2 lore raw
In reply to Aleksander Jan Bajkowski
Quoted 8 lines · Aleksander Jan Bajkowski

During driver detach, the same hash algorithm is unregistered multiple times due to a wrong iterator.

Fixes 9739f5f93b78 ("crypto: eip93 - Add Inside Secure SafeXcel EIP-93 crypto engine support")
---
 drivers/crypto/inside-secure/eip93/eip93-main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch applied. Thanks.

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt