Commit c15787a7c3f702c4240708fb8e63abce1bfe1136
1 parent
a686425b31
Exists in
smarc-l5.0.0_1.0.0-ga
and in
5 other branches
s390: remove dead code from signal handler
The code in entry[64].S calls do_signal only on return to user space. user_mode(regs) is true for every calls to do_signal, it is unnecessary to recheck user_mode at the start of do_signal and the legacy signal stack switching path in get_sigframe is never reached. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Showing 2 changed files with 0 additions and 23 deletions Side-by-side Diff
arch/s390/kernel/compat_signal.c
... | ... | @@ -437,13 +437,6 @@ |
437 | 437 | sp = current->sas_ss_sp + current->sas_ss_size; |
438 | 438 | } |
439 | 439 | |
440 | - /* This is the legacy signal stack switching. */ | |
441 | - else if (!user_mode(regs) && | |
442 | - !(ka->sa.sa_flags & SA_RESTORER) && | |
443 | - ka->sa.sa_restorer) { | |
444 | - sp = (unsigned long) ka->sa.sa_restorer; | |
445 | - } | |
446 | - | |
447 | 440 | return (void __user *)((sp - frame_size) & -8ul); |
448 | 441 | } |
449 | 442 |
arch/s390/kernel/signal.c
... | ... | @@ -235,13 +235,6 @@ |
235 | 235 | sp = current->sas_ss_sp + current->sas_ss_size; |
236 | 236 | } |
237 | 237 | |
238 | - /* This is the legacy signal stack switching. */ | |
239 | - else if (!user_mode(regs) && | |
240 | - !(ka->sa.sa_flags & SA_RESTORER) && | |
241 | - ka->sa.sa_restorer) { | |
242 | - sp = (unsigned long) ka->sa.sa_restorer; | |
243 | - } | |
244 | - | |
245 | 238 | return (void __user *)((sp - frame_size) & -8ul); |
246 | 239 | } |
247 | 240 | |
... | ... | @@ -413,15 +406,6 @@ |
413 | 406 | int signr; |
414 | 407 | struct k_sigaction ka; |
415 | 408 | sigset_t *oldset; |
416 | - | |
417 | - /* | |
418 | - * We want the common case to go fast, which | |
419 | - * is why we may in certain cases get here from | |
420 | - * kernel mode. Just return without doing anything | |
421 | - * if so. | |
422 | - */ | |
423 | - if (!user_mode(regs)) | |
424 | - return; | |
425 | 409 | |
426 | 410 | if (test_thread_flag(TIF_RESTORE_SIGMASK)) |
427 | 411 | oldset = ¤t->saved_sigmask; |