diff options
Diffstat (limited to 'include/linux/tracehook.h')
-rw-r--r-- | include/linux/tracehook.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/include/linux/tracehook.h b/include/linux/tracehook.h index 830e6e16097d..9a5b3be2503a 100644 --- a/include/linux/tracehook.h +++ b/include/linux/tracehook.h | |||
@@ -228,4 +228,32 @@ static inline void tracehook_report_vfork_done(struct task_struct *child, | |||
228 | ptrace_event(PT_TRACE_VFORK_DONE, PTRACE_EVENT_VFORK_DONE, pid); | 228 | ptrace_event(PT_TRACE_VFORK_DONE, PTRACE_EVENT_VFORK_DONE, pid); |
229 | } | 229 | } |
230 | 230 | ||
231 | /** | ||
232 | * tracehook_prepare_release_task - task is being reaped, clean up tracing | ||
233 | * @task: task in %EXIT_DEAD state | ||
234 | * | ||
235 | * This is called in release_task() just before @task gets finally reaped | ||
236 | * and freed. This would be the ideal place to remove and clean up any | ||
237 | * tracing-related state for @task. | ||
238 | * | ||
239 | * Called with no locks held. | ||
240 | */ | ||
241 | static inline void tracehook_prepare_release_task(struct task_struct *task) | ||
242 | { | ||
243 | } | ||
244 | |||
245 | /** | ||
246 | * tracehook_finish_release_task - task is being reaped, clean up tracing | ||
247 | * @task: task in %EXIT_DEAD state | ||
248 | * | ||
249 | * This is called in release_task() when @task is being in the middle of | ||
250 | * being reaped. After this, there must be no tracing entanglements. | ||
251 | * | ||
252 | * Called with write_lock_irq(&tasklist_lock) held. | ||
253 | */ | ||
254 | static inline void tracehook_finish_release_task(struct task_struct *task) | ||
255 | { | ||
256 | ptrace_release_task(task); | ||
257 | } | ||
258 | |||
231 | #endif /* <linux/tracehook.h> */ | 259 | #endif /* <linux/tracehook.h> */ |