diff --git a/crypto/algapi.c b/crypto/algapi.c
index 3103e6a1282e6cf6fd22f353a9fae956a029fe18..abf100c054e0a3472eb6f3de0fdd3e98171fbcbf 100644
--- a/crypto/algapi.c
+++ b/crypto/algapi.c
@@ -612,6 +612,22 @@ int crypto_init_spawn2(struct crypto_spawn *spawn, struct crypto_alg *alg,
 }
 EXPORT_SYMBOL_GPL(crypto_init_spawn2);
 
+int crypto_grab_spawn(struct crypto_spawn *spawn, const char *name,
+		      u32 type, u32 mask)
+{
+	struct crypto_alg *alg;
+	int err;
+
+	alg = crypto_find_alg(name, spawn->frontend, type, mask);
+	if (IS_ERR(alg))
+		return PTR_ERR(alg);
+
+	err = crypto_init_spawn(spawn, alg, spawn->inst, mask);
+	crypto_mod_put(alg);
+	return err;
+}
+EXPORT_SYMBOL_GPL(crypto_grab_spawn);
+
 void crypto_drop_spawn(struct crypto_spawn *spawn)
 {
 	if (!spawn->alg)
diff --git a/include/crypto/algapi.h b/include/crypto/algapi.h
index 0ecb7688af71aa28496404ddbcdbfafdcb45ce6e..a949bf70983b8a7234091415495a92e1ed03163c 100644
--- a/include/crypto/algapi.h
+++ b/include/crypto/algapi.h
@@ -144,6 +144,8 @@ int crypto_init_spawn(struct crypto_spawn *spawn, struct crypto_alg *alg,
 int crypto_init_spawn2(struct crypto_spawn *spawn, struct crypto_alg *alg,
 		       struct crypto_instance *inst,
 		       const struct crypto_type *frontend);
+int crypto_grab_spawn(struct crypto_spawn *spawn, const char *name,
+		      u32 type, u32 mask);
 
 void crypto_drop_spawn(struct crypto_spawn *spawn);
 struct crypto_tfm *crypto_spawn_tfm(struct crypto_spawn *spawn, u32 type,