mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 02:30:34 +02:00 
			
		
		
		
	move key_repace_session_keyring() into tracehook_notify_resume()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
		
							parent
							
								
									1227dd773d
								
							
						
					
					
						commit
						a42c6ded82
					
				
					 30 changed files with 6 additions and 66 deletions
				
			
		| 
						 | 
					@ -590,7 +590,5 @@ do_notify_resume(struct pt_regs *regs, struct switch_stack *sw,
 | 
				
			||||||
	if (thread_info_flags & _TIF_NOTIFY_RESUME) {
 | 
						if (thread_info_flags & _TIF_NOTIFY_RESUME) {
 | 
				
			||||||
		clear_thread_flag(TIF_NOTIFY_RESUME);
 | 
							clear_thread_flag(TIF_NOTIFY_RESUME);
 | 
				
			||||||
		tracehook_notify_resume(regs);
 | 
							tracehook_notify_resume(regs);
 | 
				
			||||||
		if (current->replacement_session_keyring)
 | 
					 | 
				
			||||||
			key_replace_session_keyring();
 | 
					 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -728,7 +728,5 @@ do_notify_resume(struct pt_regs *regs, unsigned int thread_flags, int syscall)
 | 
				
			||||||
	if (thread_flags & _TIF_NOTIFY_RESUME) {
 | 
						if (thread_flags & _TIF_NOTIFY_RESUME) {
 | 
				
			||||||
		clear_thread_flag(TIF_NOTIFY_RESUME);
 | 
							clear_thread_flag(TIF_NOTIFY_RESUME);
 | 
				
			||||||
		tracehook_notify_resume(regs);
 | 
							tracehook_notify_resume(regs);
 | 
				
			||||||
		if (current->replacement_session_keyring)
 | 
					 | 
				
			||||||
			key_replace_session_keyring();
 | 
					 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -321,7 +321,5 @@ asmlinkage void do_notify_resume(struct pt_regs *regs, struct thread_info *ti)
 | 
				
			||||||
	if (ti->flags & _TIF_NOTIFY_RESUME) {
 | 
						if (ti->flags & _TIF_NOTIFY_RESUME) {
 | 
				
			||||||
		clear_thread_flag(TIF_NOTIFY_RESUME);
 | 
							clear_thread_flag(TIF_NOTIFY_RESUME);
 | 
				
			||||||
		tracehook_notify_resume(regs);
 | 
							tracehook_notify_resume(regs);
 | 
				
			||||||
		if (current->replacement_session_keyring)
 | 
					 | 
				
			||||||
			key_replace_session_keyring();
 | 
					 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -336,8 +336,6 @@ asmlinkage void do_notify_resume(struct pt_regs *regs)
 | 
				
			||||||
	if (test_thread_flag(TIF_NOTIFY_RESUME)) {
 | 
						if (test_thread_flag(TIF_NOTIFY_RESUME)) {
 | 
				
			||||||
		clear_thread_flag(TIF_NOTIFY_RESUME);
 | 
							clear_thread_flag(TIF_NOTIFY_RESUME);
 | 
				
			||||||
		tracehook_notify_resume(regs);
 | 
							tracehook_notify_resume(regs);
 | 
				
			||||||
		if (current->replacement_session_keyring)
 | 
					 | 
				
			||||||
			key_replace_session_keyring();
 | 
					 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -364,7 +364,5 @@ asmlinkage void do_notify_resume(struct pt_regs *regs, u32 thread_info_flags,
 | 
				
			||||||
	if (thread_info_flags & (1 << TIF_NOTIFY_RESUME)) {
 | 
						if (thread_info_flags & (1 << TIF_NOTIFY_RESUME)) {
 | 
				
			||||||
		clear_thread_flag(TIF_NOTIFY_RESUME);
 | 
							clear_thread_flag(TIF_NOTIFY_RESUME);
 | 
				
			||||||
		tracehook_notify_resume(regs);
 | 
							tracehook_notify_resume(regs);
 | 
				
			||||||
		if (current->replacement_session_keyring)
 | 
					 | 
				
			||||||
			key_replace_session_keyring();
 | 
					 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -40,7 +40,5 @@ void do_notify_resume(int canrestart, struct pt_regs *regs,
 | 
				
			||||||
	if (thread_info_flags & _TIF_NOTIFY_RESUME) {
 | 
						if (thread_info_flags & _TIF_NOTIFY_RESUME) {
 | 
				
			||||||
		clear_thread_flag(TIF_NOTIFY_RESUME);
 | 
							clear_thread_flag(TIF_NOTIFY_RESUME);
 | 
				
			||||||
		tracehook_notify_resume(regs);
 | 
							tracehook_notify_resume(regs);
 | 
				
			||||||
		if (current->replacement_session_keyring)
 | 
					 | 
				
			||||||
			key_replace_session_keyring();
 | 
					 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -562,8 +562,6 @@ asmlinkage void do_notify_resume(__u32 thread_info_flags)
 | 
				
			||||||
	if (thread_info_flags & _TIF_NOTIFY_RESUME) {
 | 
						if (thread_info_flags & _TIF_NOTIFY_RESUME) {
 | 
				
			||||||
		clear_thread_flag(TIF_NOTIFY_RESUME);
 | 
							clear_thread_flag(TIF_NOTIFY_RESUME);
 | 
				
			||||||
		tracehook_notify_resume(__frame);
 | 
							tracehook_notify_resume(__frame);
 | 
				
			||||||
		if (current->replacement_session_keyring)
 | 
					 | 
				
			||||||
			key_replace_session_keyring();
 | 
					 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
} /* end do_notify_resume() */
 | 
					} /* end do_notify_resume() */
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -513,7 +513,5 @@ asmlinkage void do_notify_resume(struct pt_regs *regs, u32 thread_info_flags)
 | 
				
			||||||
	if (thread_info_flags & _TIF_NOTIFY_RESUME) {
 | 
						if (thread_info_flags & _TIF_NOTIFY_RESUME) {
 | 
				
			||||||
		clear_thread_flag(TIF_NOTIFY_RESUME);
 | 
							clear_thread_flag(TIF_NOTIFY_RESUME);
 | 
				
			||||||
		tracehook_notify_resume(regs);
 | 
							tracehook_notify_resume(regs);
 | 
				
			||||||
		if (current->replacement_session_keyring)
 | 
					 | 
				
			||||||
			key_replace_session_keyring();
 | 
					 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -273,8 +273,6 @@ void do_notify_resume(struct pt_regs *regs, unsigned long thread_info_flags)
 | 
				
			||||||
	if (thread_info_flags & _TIF_NOTIFY_RESUME) {
 | 
						if (thread_info_flags & _TIF_NOTIFY_RESUME) {
 | 
				
			||||||
		clear_thread_flag(TIF_NOTIFY_RESUME);
 | 
							clear_thread_flag(TIF_NOTIFY_RESUME);
 | 
				
			||||||
		tracehook_notify_resume(regs);
 | 
							tracehook_notify_resume(regs);
 | 
				
			||||||
		if (current->replacement_session_keyring)
 | 
					 | 
				
			||||||
			key_replace_session_keyring();
 | 
					 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -199,8 +199,6 @@ do_notify_resume_user(sigset_t *unused, struct sigscratch *scr, long in_syscall)
 | 
				
			||||||
	if (test_thread_flag(TIF_NOTIFY_RESUME)) {
 | 
						if (test_thread_flag(TIF_NOTIFY_RESUME)) {
 | 
				
			||||||
		clear_thread_flag(TIF_NOTIFY_RESUME);
 | 
							clear_thread_flag(TIF_NOTIFY_RESUME);
 | 
				
			||||||
		tracehook_notify_resume(&scr->pt);
 | 
							tracehook_notify_resume(&scr->pt);
 | 
				
			||||||
		if (current->replacement_session_keyring)
 | 
					 | 
				
			||||||
			key_replace_session_keyring();
 | 
					 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* copy user rbs to kernel rbs */
 | 
						/* copy user rbs to kernel rbs */
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -383,8 +383,6 @@ void do_notify_resume(struct pt_regs *regs, __u32 thread_info_flags)
 | 
				
			||||||
	if (thread_info_flags & _TIF_NOTIFY_RESUME) {
 | 
						if (thread_info_flags & _TIF_NOTIFY_RESUME) {
 | 
				
			||||||
		clear_thread_flag(TIF_NOTIFY_RESUME);
 | 
							clear_thread_flag(TIF_NOTIFY_RESUME);
 | 
				
			||||||
		tracehook_notify_resume(regs);
 | 
							tracehook_notify_resume(regs);
 | 
				
			||||||
		if (current->replacement_session_keyring)
 | 
					 | 
				
			||||||
			key_replace_session_keyring();
 | 
					 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	clear_thread_flag(TIF_IRET);
 | 
						clear_thread_flag(TIF_IRET);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1193,9 +1193,6 @@ void do_notify_resume(struct pt_regs *regs)
 | 
				
			||||||
	if (test_thread_flag(TIF_SIGPENDING))
 | 
						if (test_thread_flag(TIF_SIGPENDING))
 | 
				
			||||||
		do_signal(regs);
 | 
							do_signal(regs);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (test_and_clear_thread_flag(TIF_NOTIFY_RESUME)) {
 | 
						if (test_and_clear_thread_flag(TIF_NOTIFY_RESUME))
 | 
				
			||||||
		tracehook_notify_resume(regs);
 | 
							tracehook_notify_resume(regs);
 | 
				
			||||||
		if (current->replacement_session_keyring)
 | 
					 | 
				
			||||||
			key_replace_session_keyring();
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -401,9 +401,6 @@ void do_notify_resume(struct pt_regs *regs, int in_syscall)
 | 
				
			||||||
	if (test_thread_flag(TIF_SIGPENDING))
 | 
						if (test_thread_flag(TIF_SIGPENDING))
 | 
				
			||||||
		do_signal(regs, in_syscall);
 | 
							do_signal(regs, in_syscall);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (test_and_clear_thread_flag(TIF_NOTIFY_RESUME)) {
 | 
						if (test_and_clear_thread_flag(TIF_NOTIFY_RESUME))
 | 
				
			||||||
		tracehook_notify_resume(regs);
 | 
							tracehook_notify_resume(regs);
 | 
				
			||||||
		if (current->replacement_session_keyring)
 | 
					 | 
				
			||||||
			key_replace_session_keyring();
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -636,8 +636,6 @@ asmlinkage void do_notify_resume(struct pt_regs *regs, void *unused,
 | 
				
			||||||
	if (thread_info_flags & _TIF_NOTIFY_RESUME) {
 | 
						if (thread_info_flags & _TIF_NOTIFY_RESUME) {
 | 
				
			||||||
		clear_thread_flag(TIF_NOTIFY_RESUME);
 | 
							clear_thread_flag(TIF_NOTIFY_RESUME);
 | 
				
			||||||
		tracehook_notify_resume(regs);
 | 
							tracehook_notify_resume(regs);
 | 
				
			||||||
		if (current->replacement_session_keyring)
 | 
					 | 
				
			||||||
			key_replace_session_keyring();
 | 
					 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -554,7 +554,5 @@ asmlinkage void do_notify_resume(struct pt_regs *regs, u32 thread_info_flags)
 | 
				
			||||||
	if (thread_info_flags & _TIF_NOTIFY_RESUME) {
 | 
						if (thread_info_flags & _TIF_NOTIFY_RESUME) {
 | 
				
			||||||
		clear_thread_flag(TIF_NOTIFY_RESUME);
 | 
							clear_thread_flag(TIF_NOTIFY_RESUME);
 | 
				
			||||||
		tracehook_notify_resume(current_frame());
 | 
							tracehook_notify_resume(current_frame());
 | 
				
			||||||
		if (current->replacement_session_keyring)
 | 
					 | 
				
			||||||
			key_replace_session_keyring();
 | 
					 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -376,7 +376,5 @@ asmlinkage void do_notify_resume(struct pt_regs *regs)
 | 
				
			||||||
	if (current_thread_info()->flags & _TIF_NOTIFY_RESUME) {
 | 
						if (current_thread_info()->flags & _TIF_NOTIFY_RESUME) {
 | 
				
			||||||
		clear_thread_flag(TIF_NOTIFY_RESUME);
 | 
							clear_thread_flag(TIF_NOTIFY_RESUME);
 | 
				
			||||||
		tracehook_notify_resume(regs);
 | 
							tracehook_notify_resume(regs);
 | 
				
			||||||
		if (current->replacement_session_keyring)
 | 
					 | 
				
			||||||
			key_replace_session_keyring();
 | 
					 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -638,7 +638,5 @@ void do_notify_resume(struct pt_regs *regs, long in_syscall)
 | 
				
			||||||
	if (test_thread_flag(TIF_NOTIFY_RESUME)) {
 | 
						if (test_thread_flag(TIF_NOTIFY_RESUME)) {
 | 
				
			||||||
		clear_thread_flag(TIF_NOTIFY_RESUME);
 | 
							clear_thread_flag(TIF_NOTIFY_RESUME);
 | 
				
			||||||
		tracehook_notify_resume(regs);
 | 
							tracehook_notify_resume(regs);
 | 
				
			||||||
		if (current->replacement_session_keyring)
 | 
					 | 
				
			||||||
			key_replace_session_keyring();
 | 
					 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -193,8 +193,6 @@ void do_notify_resume(struct pt_regs *regs, unsigned long thread_info_flags)
 | 
				
			||||||
	if (thread_info_flags & _TIF_NOTIFY_RESUME) {
 | 
						if (thread_info_flags & _TIF_NOTIFY_RESUME) {
 | 
				
			||||||
		clear_thread_flag(TIF_NOTIFY_RESUME);
 | 
							clear_thread_flag(TIF_NOTIFY_RESUME);
 | 
				
			||||||
		tracehook_notify_resume(regs);
 | 
							tracehook_notify_resume(regs);
 | 
				
			||||||
		if (current->replacement_session_keyring)
 | 
					 | 
				
			||||||
			key_replace_session_keyring();
 | 
					 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -494,6 +494,4 @@ void do_notify_resume(struct pt_regs *regs)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	clear_thread_flag(TIF_NOTIFY_RESUME);
 | 
						clear_thread_flag(TIF_NOTIFY_RESUME);
 | 
				
			||||||
	tracehook_notify_resume(regs);
 | 
						tracehook_notify_resume(regs);
 | 
				
			||||||
	if (current->replacement_session_keyring)
 | 
					 | 
				
			||||||
		key_replace_session_keyring();
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -356,7 +356,5 @@ asmlinkage void do_notify_resume(struct pt_regs *regs, void *unused,
 | 
				
			||||||
	if (thread_info_flags & _TIF_NOTIFY_RESUME) {
 | 
						if (thread_info_flags & _TIF_NOTIFY_RESUME) {
 | 
				
			||||||
		clear_thread_flag(TIF_NOTIFY_RESUME);
 | 
							clear_thread_flag(TIF_NOTIFY_RESUME);
 | 
				
			||||||
		tracehook_notify_resume(regs);
 | 
							tracehook_notify_resume(regs);
 | 
				
			||||||
		if (current->replacement_session_keyring)
 | 
					 | 
				
			||||||
			key_replace_session_keyring();
 | 
					 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -626,7 +626,5 @@ asmlinkage void do_notify_resume(struct pt_regs *regs, unsigned int save_r0,
 | 
				
			||||||
	if (thread_info_flags & _TIF_NOTIFY_RESUME) {
 | 
						if (thread_info_flags & _TIF_NOTIFY_RESUME) {
 | 
				
			||||||
		clear_thread_flag(TIF_NOTIFY_RESUME);
 | 
							clear_thread_flag(TIF_NOTIFY_RESUME);
 | 
				
			||||||
		tracehook_notify_resume(regs);
 | 
							tracehook_notify_resume(regs);
 | 
				
			||||||
		if (current->replacement_session_keyring)
 | 
					 | 
				
			||||||
			key_replace_session_keyring();
 | 
					 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -685,7 +685,5 @@ asmlinkage void do_notify_resume(struct pt_regs *regs, unsigned long thread_info
 | 
				
			||||||
	if (thread_info_flags & _TIF_NOTIFY_RESUME) {
 | 
						if (thread_info_flags & _TIF_NOTIFY_RESUME) {
 | 
				
			||||||
		clear_thread_flag(TIF_NOTIFY_RESUME);
 | 
							clear_thread_flag(TIF_NOTIFY_RESUME);
 | 
				
			||||||
		tracehook_notify_resume(regs);
 | 
							tracehook_notify_resume(regs);
 | 
				
			||||||
		if (current->replacement_session_keyring)
 | 
					 | 
				
			||||||
			key_replace_session_keyring();
 | 
					 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -590,8 +590,6 @@ void do_notify_resume(struct pt_regs *regs, unsigned long orig_i0,
 | 
				
			||||||
	if (thread_info_flags & _TIF_NOTIFY_RESUME) {
 | 
						if (thread_info_flags & _TIF_NOTIFY_RESUME) {
 | 
				
			||||||
		clear_thread_flag(TIF_NOTIFY_RESUME);
 | 
							clear_thread_flag(TIF_NOTIFY_RESUME);
 | 
				
			||||||
		tracehook_notify_resume(regs);
 | 
							tracehook_notify_resume(regs);
 | 
				
			||||||
		if (current->replacement_session_keyring)
 | 
					 | 
				
			||||||
			key_replace_session_keyring();
 | 
					 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -607,8 +607,6 @@ void do_notify_resume(struct pt_regs *regs, unsigned long orig_i0, unsigned long
 | 
				
			||||||
	if (thread_info_flags & _TIF_NOTIFY_RESUME) {
 | 
						if (thread_info_flags & _TIF_NOTIFY_RESUME) {
 | 
				
			||||||
		clear_thread_flag(TIF_NOTIFY_RESUME);
 | 
							clear_thread_flag(TIF_NOTIFY_RESUME);
 | 
				
			||||||
		tracehook_notify_resume(regs);
 | 
							tracehook_notify_resume(regs);
 | 
				
			||||||
		if (current->replacement_session_keyring)
 | 
					 | 
				
			||||||
			key_replace_session_keyring();
 | 
					 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -569,8 +569,6 @@ int do_work_pending(struct pt_regs *regs, u32 thread_info_flags)
 | 
				
			||||||
	if (thread_info_flags & _TIF_NOTIFY_RESUME) {
 | 
						if (thread_info_flags & _TIF_NOTIFY_RESUME) {
 | 
				
			||||||
		clear_thread_flag(TIF_NOTIFY_RESUME);
 | 
							clear_thread_flag(TIF_NOTIFY_RESUME);
 | 
				
			||||||
		tracehook_notify_resume(regs);
 | 
							tracehook_notify_resume(regs);
 | 
				
			||||||
		if (current->replacement_session_keyring)
 | 
					 | 
				
			||||||
			key_replace_session_keyring();
 | 
					 | 
				
			||||||
		return 1;
 | 
							return 1;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	if (thread_info_flags & _TIF_SINGLESTEP) {
 | 
						if (thread_info_flags & _TIF_SINGLESTEP) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -117,11 +117,8 @@ void interrupt_end(void)
 | 
				
			||||||
		schedule();
 | 
							schedule();
 | 
				
			||||||
	if (test_thread_flag(TIF_SIGPENDING))
 | 
						if (test_thread_flag(TIF_SIGPENDING))
 | 
				
			||||||
		do_signal();
 | 
							do_signal();
 | 
				
			||||||
	if (test_and_clear_thread_flag(TIF_NOTIFY_RESUME)) {
 | 
						if (test_and_clear_thread_flag(TIF_NOTIFY_RESUME))
 | 
				
			||||||
		tracehook_notify_resume(¤t->thread.regs);
 | 
							tracehook_notify_resume(¤t->thread.regs);
 | 
				
			||||||
		if (current->replacement_session_keyring)
 | 
					 | 
				
			||||||
			key_replace_session_keyring();
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void exit_thread(void)
 | 
					void exit_thread(void)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -464,8 +464,6 @@ asmlinkage void do_notify_resume(struct pt_regs *regs,
 | 
				
			||||||
	if (thread_flags & _TIF_NOTIFY_RESUME) {
 | 
						if (thread_flags & _TIF_NOTIFY_RESUME) {
 | 
				
			||||||
		clear_thread_flag(TIF_NOTIFY_RESUME);
 | 
							clear_thread_flag(TIF_NOTIFY_RESUME);
 | 
				
			||||||
		tracehook_notify_resume(regs);
 | 
							tracehook_notify_resume(regs);
 | 
				
			||||||
		if (current->replacement_session_keyring)
 | 
					 | 
				
			||||||
			key_replace_session_keyring();
 | 
					 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -821,8 +821,6 @@ do_notify_resume(struct pt_regs *regs, void *unused, __u32 thread_info_flags)
 | 
				
			||||||
	if (thread_info_flags & _TIF_NOTIFY_RESUME) {
 | 
						if (thread_info_flags & _TIF_NOTIFY_RESUME) {
 | 
				
			||||||
		clear_thread_flag(TIF_NOTIFY_RESUME);
 | 
							clear_thread_flag(TIF_NOTIFY_RESUME);
 | 
				
			||||||
		tracehook_notify_resume(regs);
 | 
							tracehook_notify_resume(regs);
 | 
				
			||||||
		if (current->replacement_session_keyring)
 | 
					 | 
				
			||||||
			key_replace_session_keyring();
 | 
					 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	if (thread_info_flags & _TIF_USER_RETURN_NOTIFY)
 | 
						if (thread_info_flags & _TIF_USER_RETURN_NOTIFY)
 | 
				
			||||||
		fire_user_return_notifiers();
 | 
							fire_user_return_notifiers();
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -548,9 +548,6 @@ void do_notify_resume(struct pt_regs *regs)
 | 
				
			||||||
	if (test_thread_flag(TIF_SIGPENDING))
 | 
						if (test_thread_flag(TIF_SIGPENDING))
 | 
				
			||||||
		do_signal(regs);
 | 
							do_signal(regs);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (test_and_clear_thread_flag(TIF_NOTIFY_RESUME)) {
 | 
						if (test_and_clear_thread_flag(TIF_NOTIFY_RESUME))
 | 
				
			||||||
		tracehook_notify_resume(regs);
 | 
							tracehook_notify_resume(regs);
 | 
				
			||||||
		if (current->replacement_session_keyring)
 | 
					 | 
				
			||||||
			key_replace_session_keyring();
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -183,6 +183,8 @@ static inline void set_notify_resume(struct task_struct *task)
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
static inline void tracehook_notify_resume(struct pt_regs *regs)
 | 
					static inline void tracehook_notify_resume(struct pt_regs *regs)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
						if (current->replacement_session_keyring)
 | 
				
			||||||
 | 
							key_replace_session_keyring();
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#endif	/* <linux/tracehook.h> */
 | 
					#endif	/* <linux/tracehook.h> */
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue