From: Mohammed EL Kadiri Date: Sat, 13 Jun 2026 13:04:07 +0000 (+0100) Subject: keys: request_key: replace BUG with return -EINVAL X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=10366fe27a4ce08a392eb16ed48ea0a440e671c2;p=thirdparty%2Flinux.git keys: request_key: replace BUG with return -EINVAL Replace BUG() in construct_get_dest_keyring() default case with return -EINVAL to handle the unimplemented group keyring destination gracefully. Signed-off-by: Mohammed EL Kadiri Reviewed-by: Jarkko Sakkinen Link: https://lore.kernel.org/r/20260613130408.13709-2-med08elkadiri@gmail.com Signed-off-by: Jarkko Sakkinen --- diff --git a/security/keys/request_key.c b/security/keys/request_key.c index a7673ad86d18..fa2bb9f2f538 100644 --- a/security/keys/request_key.c +++ b/security/keys/request_key.c @@ -332,7 +332,7 @@ static int construct_get_dest_keyring(struct key **_dest_keyring) case KEY_REQKEY_DEFL_GROUP_KEYRING: default: - BUG(); + return -EINVAL; } /*