[Devel] [PATCH rh7 6/6] ms/crypto: user - Allow get request with empty driver name

Konstantin Khorenko khorenko at virtuozzo.com
Thu Jun 15 19:51:32 MSK 2023


From: Herbert Xu <herbert at gondor.apana.org.au>

Currently all get requests with an empty driver name fail with
EINVAL.  Since most users actually want to supply an empty driver
name this patch removes this check.

Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>

https://jira.vzint.dev/browse/PSBM-147375

(cherry picked from ms commit 5d4a5e770d97d87082067886e7097c920b338da5)
Signed-off-by: Konstantin Khorenko <khorenko at virtuozzo.com>
---
 crypto/crypto_user.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/crypto/crypto_user.c b/crypto/crypto_user.c
index 1591d052db3f..942820294ea4 100644
--- a/crypto/crypto_user.c
+++ b/crypto/crypto_user.c
@@ -264,10 +264,7 @@ static int crypto_report(struct sk_buff *in_skb, struct nlmsghdr *in_nlh,
 	if (!null_terminated(p->cru_name) || !null_terminated(p->cru_driver_name))
 		return -EINVAL;
 
-	if (!p->cru_driver_name[0])
-		return -EINVAL;
-
-	alg = crypto_alg_match(p, 1);
+	alg = crypto_alg_match(p, 0);
 	if (!alg)
 		return -ENOENT;
 
-- 
2.24.3



More information about the Devel mailing list