Commit 23711df7 authored by Mathieu Malaterre's avatar Mathieu Malaterre Committed by James Morris

security: keys: annotate implicit fall throughs

There is a plan to build the kernel with -Wimplicit-fallthrough and
these places in the code produced warnings (W=1). Fix them up.

This commit remove the following warnings:

  security/keys/request_key.c:293:7: warning: this statement may fall through [-Wimplicit-fallthrough=]
  security/keys/request_key.c:298:7: warning: this statement may fall through [-Wimplicit-fallthrough=]
  security/keys/request_key.c:307:7: warning: this statement may fall through [-Wimplicit-fallthrough=]
Signed-off-by: default avatarMathieu Malaterre <malat@debian.org>
Signed-off-by: default avatarJames Morris <james.morris@microsoft.com>
parent 0f949bcc
...@@ -287,16 +287,19 @@ static int construct_get_dest_keyring(struct key **_dest_keyring) ...@@ -287,16 +287,19 @@ static int construct_get_dest_keyring(struct key **_dest_keyring)
} }
} }
/* fall through */
case KEY_REQKEY_DEFL_THREAD_KEYRING: case KEY_REQKEY_DEFL_THREAD_KEYRING:
dest_keyring = key_get(cred->thread_keyring); dest_keyring = key_get(cred->thread_keyring);
if (dest_keyring) if (dest_keyring)
break; break;
/* fall through */
case KEY_REQKEY_DEFL_PROCESS_KEYRING: case KEY_REQKEY_DEFL_PROCESS_KEYRING:
dest_keyring = key_get(cred->process_keyring); dest_keyring = key_get(cred->process_keyring);
if (dest_keyring) if (dest_keyring)
break; break;
/* fall through */
case KEY_REQKEY_DEFL_SESSION_KEYRING: case KEY_REQKEY_DEFL_SESSION_KEYRING:
rcu_read_lock(); rcu_read_lock();
dest_keyring = key_get( dest_keyring = key_get(
...@@ -306,6 +309,7 @@ static int construct_get_dest_keyring(struct key **_dest_keyring) ...@@ -306,6 +309,7 @@ static int construct_get_dest_keyring(struct key **_dest_keyring)
if (dest_keyring) if (dest_keyring)
break; break;
/* fall through */
case KEY_REQKEY_DEFL_USER_SESSION_KEYRING: case KEY_REQKEY_DEFL_USER_SESSION_KEYRING:
dest_keyring = dest_keyring =
key_get(cred->user->session_keyring); key_get(cred->user->session_keyring);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment