Skip to content

Commit 23711df

Browse files
malaterreJames Morris
authored andcommitted
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: Mathieu Malaterre <malat@debian.org> Signed-off-by: James Morris <james.morris@microsoft.com>
1 parent 0f949bc commit 23711df

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎security/keys/request_key.c‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,16 +287,19 @@ static int construct_get_dest_keyring(struct key **_dest_keyring)
287287
}
288288
}
289289

290+
/* fall through */
290291
case KEY_REQKEY_DEFL_THREAD_KEYRING:
291292
dest_keyring = key_get(cred->thread_keyring);
292293
if (dest_keyring)
293294
break;
294295

296+
/* fall through */
295297
case KEY_REQKEY_DEFL_PROCESS_KEYRING:
296298
dest_keyring = key_get(cred->process_keyring);
297299
if (dest_keyring)
298300
break;
299301

302+
/* fall through */
300303
case KEY_REQKEY_DEFL_SESSION_KEYRING:
301304
rcu_read_lock();
302305
dest_keyring = key_get(
@@ -306,6 +309,7 @@ static int construct_get_dest_keyring(struct key **_dest_keyring)
306309
if (dest_keyring)
307310
break;
308311

312+
/* fall through */
309313
case KEY_REQKEY_DEFL_USER_SESSION_KEYRING:
310314
dest_keyring =
311315
key_get(cred->user->session_keyring);

0 commit comments

Comments
 (0)