diff options
30 files changed, 6 insertions, 66 deletions
diff --git a/arch/alpha/kernel/signal.c b/arch/alpha/kernel/signal.c index 10ab2d74ecbb..f6db3032ddf0 100644 --- a/arch/alpha/kernel/signal.c +++ b/arch/alpha/kernel/signal.c | |||
@@ -590,7 +590,5 @@ do_notify_resume(struct pt_regs *regs, struct switch_stack *sw, | |||
590 | if (thread_info_flags & _TIF_NOTIFY_RESUME) { | 590 | if (thread_info_flags & _TIF_NOTIFY_RESUME) { |
591 | clear_thread_flag(TIF_NOTIFY_RESUME); | 591 | clear_thread_flag(TIF_NOTIFY_RESUME); |
592 | tracehook_notify_resume(regs); | 592 | tracehook_notify_resume(regs); |
593 | if (current->replacement_session_keyring) | ||
594 | key_replace_session_keyring(); | ||
595 | } | 593 | } |
596 | } | 594 | } |
diff --git a/arch/arm/kernel/signal.c b/arch/arm/kernel/signal.c index 4e5fdd9bd9e3..ec640412aed0 100644 --- a/arch/arm/kernel/signal.c +++ b/arch/arm/kernel/signal.c | |||
@@ -728,7 +728,5 @@ do_notify_resume(struct pt_regs *regs, unsigned int thread_flags, int syscall) | |||
728 | if (thread_flags & _TIF_NOTIFY_RESUME) { | 728 | if (thread_flags & _TIF_NOTIFY_RESUME) { |
729 | clear_thread_flag(TIF_NOTIFY_RESUME); | 729 | clear_thread_flag(TIF_NOTIFY_RESUME); |
730 | tracehook_notify_resume(regs); | 730 | tracehook_notify_resume(regs); |
731 | if (current->replacement_session_keyring) | ||
732 | key_replace_session_keyring(); | ||
733 | } | 731 | } |
734 | } | 732 | } |
diff --git a/arch/avr32/kernel/signal.c b/arch/avr32/kernel/signal.c index ae386c304bee..e7595ef74f51 100644 --- a/arch/avr32/kernel/signal.c +++ b/arch/avr32/kernel/signal.c | |||
@@ -321,7 +321,5 @@ asmlinkage void do_notify_resume(struct pt_regs *regs, struct thread_info *ti) | |||
321 | if (ti->flags & _TIF_NOTIFY_RESUME) { | 321 | if (ti->flags & _TIF_NOTIFY_RESUME) { |
322 | clear_thread_flag(TIF_NOTIFY_RESUME); | 322 | clear_thread_flag(TIF_NOTIFY_RESUME); |
323 | tracehook_notify_resume(regs); | 323 | tracehook_notify_resume(regs); |
324 | if (current->replacement_session_keyring) | ||
325 | key_replace_session_keyring(); | ||
326 | } | 324 | } |
327 | } | 325 | } |
diff --git a/arch/blackfin/kernel/signal.c b/arch/blackfin/kernel/signal.c index e5bbc1a5edc2..fc9ecce8b6ce 100644 --- a/arch/blackfin/kernel/signal.c +++ b/arch/blackfin/kernel/signal.c | |||
@@ -336,8 +336,6 @@ asmlinkage void do_notify_resume(struct pt_regs *regs) | |||
336 | if (test_thread_flag(TIF_NOTIFY_RESUME)) { | 336 | if (test_thread_flag(TIF_NOTIFY_RESUME)) { |
337 | clear_thread_flag(TIF_NOTIFY_RESUME); | 337 | clear_thread_flag(TIF_NOTIFY_RESUME); |
338 | tracehook_notify_resume(regs); | 338 | tracehook_notify_resume(regs); |
339 | if (current->replacement_session_keyring) | ||
340 | key_replace_session_keyring(); | ||
341 | } | 339 | } |
342 | } | 340 | } |
343 | 341 | ||
diff --git a/arch/c6x/kernel/signal.c b/arch/c6x/kernel/signal.c index cf37478c1169..9493f0bbf0a6 100644 --- a/arch/c6x/kernel/signal.c +++ b/arch/c6x/kernel/signal.c | |||
@@ -364,7 +364,5 @@ asmlinkage void do_notify_resume(struct pt_regs *regs, u32 thread_info_flags, | |||
364 | if (thread_info_flags & (1 << TIF_NOTIFY_RESUME)) { | 364 | if (thread_info_flags & (1 << TIF_NOTIFY_RESUME)) { |
365 | clear_thread_flag(TIF_NOTIFY_RESUME); | 365 | clear_thread_flag(TIF_NOTIFY_RESUME); |
366 | tracehook_notify_resume(regs); | 366 | tracehook_notify_resume(regs); |
367 | if (current->replacement_session_keyring) | ||
368 | key_replace_session_keyring(); | ||
369 | } | 367 | } |
370 | } | 368 | } |
diff --git a/arch/cris/kernel/ptrace.c b/arch/cris/kernel/ptrace.c index d114ad3da9b1..58d44ee1a71f 100644 --- a/arch/cris/kernel/ptrace.c +++ b/arch/cris/kernel/ptrace.c | |||
@@ -40,7 +40,5 @@ void do_notify_resume(int canrestart, struct pt_regs *regs, | |||
40 | if (thread_info_flags & _TIF_NOTIFY_RESUME) { | 40 | if (thread_info_flags & _TIF_NOTIFY_RESUME) { |
41 | clear_thread_flag(TIF_NOTIFY_RESUME); | 41 | clear_thread_flag(TIF_NOTIFY_RESUME); |
42 | tracehook_notify_resume(regs); | 42 | tracehook_notify_resume(regs); |
43 | if (current->replacement_session_keyring) | ||
44 | key_replace_session_keyring(); | ||
45 | } | 43 | } |
46 | } | 44 | } |
diff --git a/arch/frv/kernel/signal.c b/arch/frv/kernel/signal.c index 8cf5dca01758..595bf1e5a5dc 100644 --- a/arch/frv/kernel/signal.c +++ b/arch/frv/kernel/signal.c | |||
@@ -562,8 +562,6 @@ asmlinkage void do_notify_resume(__u32 thread_info_flags) | |||
562 | if (thread_info_flags & _TIF_NOTIFY_RESUME) { | 562 | if (thread_info_flags & _TIF_NOTIFY_RESUME) { |
563 | clear_thread_flag(TIF_NOTIFY_RESUME); | 563 | clear_thread_flag(TIF_NOTIFY_RESUME); |
564 | tracehook_notify_resume(__frame); | 564 | tracehook_notify_resume(__frame); |
565 | if (current->replacement_session_keyring) | ||
566 | key_replace_session_keyring(); | ||
567 | } | 565 | } |
568 | 566 | ||
569 | } /* end do_notify_resume() */ | 567 | } /* end do_notify_resume() */ |
diff --git a/arch/h8300/kernel/signal.c b/arch/h8300/kernel/signal.c index d4b0555d2904..e58992ad789e 100644 --- a/arch/h8300/kernel/signal.c +++ b/arch/h8300/kernel/signal.c | |||
@@ -513,7 +513,5 @@ asmlinkage void do_notify_resume(struct pt_regs *regs, u32 thread_info_flags) | |||
513 | if (thread_info_flags & _TIF_NOTIFY_RESUME) { | 513 | if (thread_info_flags & _TIF_NOTIFY_RESUME) { |
514 | clear_thread_flag(TIF_NOTIFY_RESUME); | 514 | clear_thread_flag(TIF_NOTIFY_RESUME); |
515 | tracehook_notify_resume(regs); | 515 | tracehook_notify_resume(regs); |
516 | if (current->replacement_session_keyring) | ||
517 | key_replace_session_keyring(); | ||
518 | } | 516 | } |
519 | } | 517 | } |
diff --git a/arch/hexagon/kernel/signal.c b/arch/hexagon/kernel/signal.c index 434866eb0f1c..21a3018cb9bf 100644 --- a/arch/hexagon/kernel/signal.c +++ b/arch/hexagon/kernel/signal.c | |||
@@ -273,8 +273,6 @@ void do_notify_resume(struct pt_regs *regs, unsigned long thread_info_flags) | |||
273 | if (thread_info_flags & _TIF_NOTIFY_RESUME) { | 273 | if (thread_info_flags & _TIF_NOTIFY_RESUME) { |
274 | clear_thread_flag(TIF_NOTIFY_RESUME); | 274 | clear_thread_flag(TIF_NOTIFY_RESUME); |
275 | tracehook_notify_resume(regs); | 275 | tracehook_notify_resume(regs); |
276 | if (current->replacement_session_keyring) | ||
277 | key_replace_session_keyring(); | ||
278 | } | 276 | } |
279 | } | 277 | } |
280 | 278 | ||
diff --git a/arch/ia64/kernel/process.c b/arch/ia64/kernel/process.c index 5e0e86ddb12f..dd6fc1449741 100644 --- a/arch/ia64/kernel/process.c +++ b/arch/ia64/kernel/process.c | |||
@@ -199,8 +199,6 @@ do_notify_resume_user(sigset_t *unused, struct sigscratch *scr, long in_syscall) | |||
199 | if (test_thread_flag(TIF_NOTIFY_RESUME)) { | 199 | if (test_thread_flag(TIF_NOTIFY_RESUME)) { |
200 | clear_thread_flag(TIF_NOTIFY_RESUME); | 200 | clear_thread_flag(TIF_NOTIFY_RESUME); |
201 | tracehook_notify_resume(&scr->pt); | 201 | tracehook_notify_resume(&scr->pt); |
202 | if (current->replacement_session_keyring) | ||
203 | key_replace_session_keyring(); | ||
204 | } | 202 | } |
205 | 203 | ||
206 | /* copy user rbs to kernel rbs */ | 204 | /* copy user rbs to kernel rbs */ |
diff --git a/arch/m32r/kernel/signal.c b/arch/m32r/kernel/signal.c index f54d96993ea1..64804f1f5141 100644 --- a/arch/m32r/kernel/signal.c +++ b/arch/m32r/kernel/signal.c | |||
@@ -383,8 +383,6 @@ void do_notify_resume(struct pt_regs *regs, __u32 thread_info_flags) | |||
383 | if (thread_info_flags & _TIF_NOTIFY_RESUME) { | 383 | if (thread_info_flags & _TIF_NOTIFY_RESUME) { |
384 | clear_thread_flag(TIF_NOTIFY_RESUME); | 384 | clear_thread_flag(TIF_NOTIFY_RESUME); |
385 | tracehook_notify_resume(regs); | 385 | tracehook_notify_resume(regs); |
386 | if (current->replacement_session_keyring) | ||
387 | key_replace_session_keyring(); | ||
388 | } | 386 | } |
389 | 387 | ||
390 | clear_thread_flag(TIF_IRET); | 388 | clear_thread_flag(TIF_IRET); |
diff --git a/arch/m68k/kernel/signal.c b/arch/m68k/kernel/signal.c index d9f3d1900eed..973eec60cad4 100644 --- a/arch/m68k/kernel/signal.c +++ b/arch/m68k/kernel/signal.c | |||
@@ -1193,9 +1193,6 @@ void do_notify_resume(struct pt_regs *regs) | |||
1193 | if (test_thread_flag(TIF_SIGPENDING)) | 1193 | if (test_thread_flag(TIF_SIGPENDING)) |
1194 | do_signal(regs); | 1194 | do_signal(regs); |
1195 | 1195 | ||
1196 | if (test_and_clear_thread_flag(TIF_NOTIFY_RESUME)) { | 1196 | if (test_and_clear_thread_flag(TIF_NOTIFY_RESUME)) |
1197 | tracehook_notify_resume(regs); | 1197 | tracehook_notify_resume(regs); |
1198 | if (current->replacement_session_keyring) | ||
1199 | key_replace_session_keyring(); | ||
1200 | } | ||
1201 | } | 1198 | } |
diff --git a/arch/microblaze/kernel/signal.c b/arch/microblaze/kernel/signal.c index 7f4c7bef1642..5d796e32786e 100644 --- a/arch/microblaze/kernel/signal.c +++ b/arch/microblaze/kernel/signal.c | |||
@@ -401,9 +401,6 @@ void do_notify_resume(struct pt_regs *regs, int in_syscall) | |||
401 | if (test_thread_flag(TIF_SIGPENDING)) | 401 | if (test_thread_flag(TIF_SIGPENDING)) |
402 | do_signal(regs, in_syscall); | 402 | do_signal(regs, in_syscall); |
403 | 403 | ||
404 | if (test_and_clear_thread_flag(TIF_NOTIFY_RESUME)) { | 404 | if (test_and_clear_thread_flag(TIF_NOTIFY_RESUME)) |
405 | tracehook_notify_resume(regs); | 405 | tracehook_notify_resume(regs); |
406 | if (current->replacement_session_keyring) | ||
407 | key_replace_session_keyring(); | ||
408 | } | ||
409 | } | 406 | } |
diff --git a/arch/mips/kernel/signal.c b/arch/mips/kernel/signal.c index 17f6ee30ad0d..8a6e6d116ab0 100644 --- a/arch/mips/kernel/signal.c +++ b/arch/mips/kernel/signal.c | |||
@@ -636,8 +636,6 @@ asmlinkage void do_notify_resume(struct pt_regs *regs, void *unused, | |||
636 | if (thread_info_flags & _TIF_NOTIFY_RESUME) { | 636 | if (thread_info_flags & _TIF_NOTIFY_RESUME) { |
637 | clear_thread_flag(TIF_NOTIFY_RESUME); | 637 | clear_thread_flag(TIF_NOTIFY_RESUME); |
638 | tracehook_notify_resume(regs); | 638 | tracehook_notify_resume(regs); |
639 | if (current->replacement_session_keyring) | ||
640 | key_replace_session_keyring(); | ||
641 | } | 639 | } |
642 | } | 640 | } |
643 | 641 | ||
diff --git a/arch/mn10300/kernel/signal.c b/arch/mn10300/kernel/signal.c index 890cf91767cc..b8b6aa1a6837 100644 --- a/arch/mn10300/kernel/signal.c +++ b/arch/mn10300/kernel/signal.c | |||
@@ -554,7 +554,5 @@ asmlinkage void do_notify_resume(struct pt_regs *regs, u32 thread_info_flags) | |||
554 | if (thread_info_flags & _TIF_NOTIFY_RESUME) { | 554 | if (thread_info_flags & _TIF_NOTIFY_RESUME) { |
555 | clear_thread_flag(TIF_NOTIFY_RESUME); | 555 | clear_thread_flag(TIF_NOTIFY_RESUME); |
556 | tracehook_notify_resume(current_frame()); | 556 | tracehook_notify_resume(current_frame()); |
557 | if (current->replacement_session_keyring) | ||
558 | key_replace_session_keyring(); | ||
559 | } | 557 | } |
560 | } | 558 | } |
diff --git a/arch/openrisc/kernel/signal.c b/arch/openrisc/kernel/signal.c index e970743251ae..9ae611522953 100644 --- a/arch/openrisc/kernel/signal.c +++ b/arch/openrisc/kernel/signal.c | |||
@@ -376,7 +376,5 @@ asmlinkage void do_notify_resume(struct pt_regs *regs) | |||
376 | if (current_thread_info()->flags & _TIF_NOTIFY_RESUME) { | 376 | if (current_thread_info()->flags & _TIF_NOTIFY_RESUME) { |
377 | clear_thread_flag(TIF_NOTIFY_RESUME); | 377 | clear_thread_flag(TIF_NOTIFY_RESUME); |
378 | tracehook_notify_resume(regs); | 378 | tracehook_notify_resume(regs); |
379 | if (current->replacement_session_keyring) | ||
380 | key_replace_session_keyring(); | ||
381 | } | 379 | } |
382 | } | 380 | } |
diff --git a/arch/parisc/kernel/signal.c b/arch/parisc/kernel/signal.c index 4b9cb0d546d1..e7a7cd3e1120 100644 --- a/arch/parisc/kernel/signal.c +++ b/arch/parisc/kernel/signal.c | |||
@@ -638,7 +638,5 @@ void do_notify_resume(struct pt_regs *regs, long in_syscall) | |||
638 | if (test_thread_flag(TIF_NOTIFY_RESUME)) { | 638 | if (test_thread_flag(TIF_NOTIFY_RESUME)) { |
639 | clear_thread_flag(TIF_NOTIFY_RESUME); | 639 | clear_thread_flag(TIF_NOTIFY_RESUME); |
640 | tracehook_notify_resume(regs); | 640 | tracehook_notify_resume(regs); |
641 | if (current->replacement_session_keyring) | ||
642 | key_replace_session_keyring(); | ||
643 | } | 641 | } |
644 | } | 642 | } |
diff --git a/arch/powerpc/kernel/signal.c b/arch/powerpc/kernel/signal.c index 651c5963662b..bfc3ec1382fb 100644 --- a/arch/powerpc/kernel/signal.c +++ b/arch/powerpc/kernel/signal.c | |||
@@ -193,8 +193,6 @@ void do_notify_resume(struct pt_regs *regs, unsigned long thread_info_flags) | |||
193 | if (thread_info_flags & _TIF_NOTIFY_RESUME) { | 193 | if (thread_info_flags & _TIF_NOTIFY_RESUME) { |
194 | clear_thread_flag(TIF_NOTIFY_RESUME); | 194 | clear_thread_flag(TIF_NOTIFY_RESUME); |
195 | tracehook_notify_resume(regs); | 195 | tracehook_notify_resume(regs); |
196 | if (current->replacement_session_keyring) | ||
197 | key_replace_session_keyring(); | ||
198 | } | 196 | } |
199 | } | 197 | } |
200 | 198 | ||
diff --git a/arch/s390/kernel/signal.c b/arch/s390/kernel/signal.c index f626232e216c..42a6e8b47f06 100644 --- a/arch/s390/kernel/signal.c +++ b/arch/s390/kernel/signal.c | |||
@@ -494,6 +494,4 @@ void do_notify_resume(struct pt_regs *regs) | |||
494 | { | 494 | { |
495 | clear_thread_flag(TIF_NOTIFY_RESUME); | 495 | clear_thread_flag(TIF_NOTIFY_RESUME); |
496 | tracehook_notify_resume(regs); | 496 | tracehook_notify_resume(regs); |
497 | if (current->replacement_session_keyring) | ||
498 | key_replace_session_keyring(); | ||
499 | } | 497 | } |
diff --git a/arch/score/kernel/signal.c b/arch/score/kernel/signal.c index d4a49011c48a..302838d3acf6 100644 --- a/arch/score/kernel/signal.c +++ b/arch/score/kernel/signal.c | |||
@@ -356,7 +356,5 @@ asmlinkage void do_notify_resume(struct pt_regs *regs, void *unused, | |||
356 | if (thread_info_flags & _TIF_NOTIFY_RESUME) { | 356 | if (thread_info_flags & _TIF_NOTIFY_RESUME) { |
357 | clear_thread_flag(TIF_NOTIFY_RESUME); | 357 | clear_thread_flag(TIF_NOTIFY_RESUME); |
358 | tracehook_notify_resume(regs); | 358 | tracehook_notify_resume(regs); |
359 | if (current->replacement_session_keyring) | ||
360 | key_replace_session_keyring(); | ||
361 | } | 359 | } |
362 | } | 360 | } |
diff --git a/arch/sh/kernel/signal_32.c b/arch/sh/kernel/signal_32.c index cb4172c8af7d..9d7bfd66f189 100644 --- a/arch/sh/kernel/signal_32.c +++ b/arch/sh/kernel/signal_32.c | |||
@@ -626,7 +626,5 @@ asmlinkage void do_notify_resume(struct pt_regs *regs, unsigned int save_r0, | |||
626 | if (thread_info_flags & _TIF_NOTIFY_RESUME) { | 626 | if (thread_info_flags & _TIF_NOTIFY_RESUME) { |
627 | clear_thread_flag(TIF_NOTIFY_RESUME); | 627 | clear_thread_flag(TIF_NOTIFY_RESUME); |
628 | tracehook_notify_resume(regs); | 628 | tracehook_notify_resume(regs); |
629 | if (current->replacement_session_keyring) | ||
630 | key_replace_session_keyring(); | ||
631 | } | 629 | } |
632 | } | 630 | } |
diff --git a/arch/sh/kernel/signal_64.c b/arch/sh/kernel/signal_64.c index b589a354c069..aa6428430842 100644 --- a/arch/sh/kernel/signal_64.c +++ b/arch/sh/kernel/signal_64.c | |||
@@ -685,7 +685,5 @@ asmlinkage void do_notify_resume(struct pt_regs *regs, unsigned long thread_info | |||
685 | if (thread_info_flags & _TIF_NOTIFY_RESUME) { | 685 | if (thread_info_flags & _TIF_NOTIFY_RESUME) { |
686 | clear_thread_flag(TIF_NOTIFY_RESUME); | 686 | clear_thread_flag(TIF_NOTIFY_RESUME); |
687 | tracehook_notify_resume(regs); | 687 | tracehook_notify_resume(regs); |
688 | if (current->replacement_session_keyring) | ||
689 | key_replace_session_keyring(); | ||
690 | } | 688 | } |
691 | } | 689 | } |
diff --git a/arch/sparc/kernel/signal_32.c b/arch/sparc/kernel/signal_32.c index 2b7e849f7c65..6b42e8622d12 100644 --- a/arch/sparc/kernel/signal_32.c +++ b/arch/sparc/kernel/signal_32.c | |||
@@ -590,8 +590,6 @@ void do_notify_resume(struct pt_regs *regs, unsigned long orig_i0, | |||
590 | if (thread_info_flags & _TIF_NOTIFY_RESUME) { | 590 | if (thread_info_flags & _TIF_NOTIFY_RESUME) { |
591 | clear_thread_flag(TIF_NOTIFY_RESUME); | 591 | clear_thread_flag(TIF_NOTIFY_RESUME); |
592 | tracehook_notify_resume(regs); | 592 | tracehook_notify_resume(regs); |
593 | if (current->replacement_session_keyring) | ||
594 | key_replace_session_keyring(); | ||
595 | } | 593 | } |
596 | } | 594 | } |
597 | 595 | ||
diff --git a/arch/sparc/kernel/signal_64.c b/arch/sparc/kernel/signal_64.c index eafaab486b2d..c82cf1cc3965 100644 --- a/arch/sparc/kernel/signal_64.c +++ b/arch/sparc/kernel/signal_64.c | |||
@@ -607,8 +607,6 @@ void do_notify_resume(struct pt_regs *regs, unsigned long orig_i0, unsigned long | |||
607 | if (thread_info_flags & _TIF_NOTIFY_RESUME) { | 607 | if (thread_info_flags & _TIF_NOTIFY_RESUME) { |
608 | clear_thread_flag(TIF_NOTIFY_RESUME); | 608 | clear_thread_flag(TIF_NOTIFY_RESUME); |
609 | tracehook_notify_resume(regs); | 609 | tracehook_notify_resume(regs); |
610 | if (current->replacement_session_keyring) | ||
611 | key_replace_session_keyring(); | ||
612 | } | 610 | } |
613 | } | 611 | } |
614 | 612 | ||
diff --git a/arch/tile/kernel/process.c b/arch/tile/kernel/process.c index f572c19c4082..32817ab6062a 100644 --- a/arch/tile/kernel/process.c +++ b/arch/tile/kernel/process.c | |||
@@ -569,8 +569,6 @@ int do_work_pending(struct pt_regs *regs, u32 thread_info_flags) | |||
569 | if (thread_info_flags & _TIF_NOTIFY_RESUME) { | 569 | if (thread_info_flags & _TIF_NOTIFY_RESUME) { |
570 | clear_thread_flag(TIF_NOTIFY_RESUME); | 570 | clear_thread_flag(TIF_NOTIFY_RESUME); |
571 | tracehook_notify_resume(regs); | 571 | tracehook_notify_resume(regs); |
572 | if (current->replacement_session_keyring) | ||
573 | key_replace_session_keyring(); | ||
574 | return 1; | 572 | return 1; |
575 | } | 573 | } |
576 | if (thread_info_flags & _TIF_SINGLESTEP) { | 574 | if (thread_info_flags & _TIF_SINGLESTEP) { |
diff --git a/arch/um/kernel/process.c b/arch/um/kernel/process.c index 3a2235e0abc3..ccb9a9d283f1 100644 --- a/arch/um/kernel/process.c +++ b/arch/um/kernel/process.c | |||
@@ -117,11 +117,8 @@ void interrupt_end(void) | |||
117 | schedule(); | 117 | schedule(); |
118 | if (test_thread_flag(TIF_SIGPENDING)) | 118 | if (test_thread_flag(TIF_SIGPENDING)) |
119 | do_signal(); | 119 | do_signal(); |
120 | if (test_and_clear_thread_flag(TIF_NOTIFY_RESUME)) { | 120 | if (test_and_clear_thread_flag(TIF_NOTIFY_RESUME)) |
121 | tracehook_notify_resume(¤t->thread.regs); | 121 | tracehook_notify_resume(¤t->thread.regs); |
122 | if (current->replacement_session_keyring) | ||
123 | key_replace_session_keyring(); | ||
124 | } | ||
125 | } | 122 | } |
126 | 123 | ||
127 | void exit_thread(void) | 124 | void exit_thread(void) |
diff --git a/arch/unicore32/kernel/signal.c b/arch/unicore32/kernel/signal.c index 7754df6ef7d4..28782ad47b93 100644 --- a/arch/unicore32/kernel/signal.c +++ b/arch/unicore32/kernel/signal.c | |||
@@ -464,8 +464,6 @@ asmlinkage void do_notify_resume(struct pt_regs *regs, | |||
464 | if (thread_flags & _TIF_NOTIFY_RESUME) { | 464 | if (thread_flags & _TIF_NOTIFY_RESUME) { |
465 | clear_thread_flag(TIF_NOTIFY_RESUME); | 465 | clear_thread_flag(TIF_NOTIFY_RESUME); |
466 | tracehook_notify_resume(regs); | 466 | tracehook_notify_resume(regs); |
467 | if (current->replacement_session_keyring) | ||
468 | key_replace_session_keyring(); | ||
469 | } | 467 | } |
470 | } | 468 | } |
471 | 469 | ||
diff --git a/arch/x86/kernel/signal.c b/arch/x86/kernel/signal.c index b68ccadd2ff4..9363b58b967c 100644 --- a/arch/x86/kernel/signal.c +++ b/arch/x86/kernel/signal.c | |||
@@ -821,8 +821,6 @@ do_notify_resume(struct pt_regs *regs, void *unused, __u32 thread_info_flags) | |||
821 | if (thread_info_flags & _TIF_NOTIFY_RESUME) { | 821 | if (thread_info_flags & _TIF_NOTIFY_RESUME) { |
822 | clear_thread_flag(TIF_NOTIFY_RESUME); | 822 | clear_thread_flag(TIF_NOTIFY_RESUME); |
823 | tracehook_notify_resume(regs); | 823 | tracehook_notify_resume(regs); |
824 | if (current->replacement_session_keyring) | ||
825 | key_replace_session_keyring(); | ||
826 | } | 824 | } |
827 | if (thread_info_flags & _TIF_USER_RETURN_NOTIFY) | 825 | if (thread_info_flags & _TIF_USER_RETURN_NOTIFY) |
828 | fire_user_return_notifiers(); | 826 | fire_user_return_notifiers(); |
diff --git a/arch/xtensa/kernel/signal.c b/arch/xtensa/kernel/signal.c index c5e4ec0598d2..ea7e17778a75 100644 --- a/arch/xtensa/kernel/signal.c +++ b/arch/xtensa/kernel/signal.c | |||
@@ -548,9 +548,6 @@ void do_notify_resume(struct pt_regs *regs) | |||
548 | if (test_thread_flag(TIF_SIGPENDING)) | 548 | if (test_thread_flag(TIF_SIGPENDING)) |
549 | do_signal(regs); | 549 | do_signal(regs); |
550 | 550 | ||
551 | if (test_and_clear_thread_flag(TIF_NOTIFY_RESUME)) { | 551 | if (test_and_clear_thread_flag(TIF_NOTIFY_RESUME)) |
552 | tracehook_notify_resume(regs); | 552 | tracehook_notify_resume(regs); |
553 | if (current->replacement_session_keyring) | ||
554 | key_replace_session_keyring(); | ||
555 | } | ||
556 | } | 553 | } |
diff --git a/include/linux/tracehook.h b/include/linux/tracehook.h index 8a2a3fc9bd05..b9ca903bb553 100644 --- a/include/linux/tracehook.h +++ b/include/linux/tracehook.h | |||
@@ -183,6 +183,8 @@ static inline void set_notify_resume(struct task_struct *task) | |||
183 | */ | 183 | */ |
184 | static inline void tracehook_notify_resume(struct pt_regs *regs) | 184 | static inline void tracehook_notify_resume(struct pt_regs *regs) |
185 | { | 185 | { |
186 | if (current->replacement_session_keyring) | ||
187 | key_replace_session_keyring(); | ||
186 | } | 188 | } |
187 | 189 | ||
188 | #endif /* <linux/tracehook.h> */ | 190 | #endif /* <linux/tracehook.h> */ |