Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Mathieu Malaterre and committed by
James Morris
23711df7 0f949bcc

+4
+4
security/keys/request_key.c
··· 287 287 } 288 288 } 289 289 290 + /* fall through */ 290 291 case KEY_REQKEY_DEFL_THREAD_KEYRING: 291 292 dest_keyring = key_get(cred->thread_keyring); 292 293 if (dest_keyring) 293 294 break; 294 295 296 + /* fall through */ 295 297 case KEY_REQKEY_DEFL_PROCESS_KEYRING: 296 298 dest_keyring = key_get(cred->process_keyring); 297 299 if (dest_keyring) 298 300 break; 299 301 302 + /* fall through */ 300 303 case KEY_REQKEY_DEFL_SESSION_KEYRING: 301 304 rcu_read_lock(); 302 305 dest_keyring = key_get( ··· 309 306 if (dest_keyring) 310 307 break; 311 308 309 + /* fall through */ 312 310 case KEY_REQKEY_DEFL_USER_SESSION_KEYRING: 313 311 dest_keyring = 314 312 key_get(cred->user->session_keyring);