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 <[email protected]>
Reviewed-by: Jarkko Sakkinen <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jarkko Sakkinen <[email protected]>
This commit is contained in:
Mohammed EL Kadiri authored and Jarkko Sakkinen committed 2026-06-15 15:19:13 +03:00
1 parent fd15b457a8
commit 10366fe27a
1 file changed
+1 -1
+1 -1
View File
@@ -332,7 +332,7 @@ static int construct_get_dest_keyring(struct key **_dest_keyring)
case KEY_REQKEY_DEFL_GROUP_KEYRING:
default:
BUG();
return -EINVAL;
}
/*