aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/kthread.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/kthread.c')
-rw-r--r--kernel/kthread.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/kernel/kthread.c b/kernel/kthread.c
index 96cff2f8710b..50598e29439a 100644
--- a/kernel/kthread.c
+++ b/kernel/kthread.c
@@ -13,6 +13,7 @@
13#include <linux/file.h> 13#include <linux/file.h>
14#include <linux/module.h> 14#include <linux/module.h>
15#include <linux/mutex.h> 15#include <linux/mutex.h>
16#include <trace/sched.h>
16 17
17#define KTHREAD_NICE_LEVEL (-5) 18#define KTHREAD_NICE_LEVEL (-5)
18 19
@@ -206,6 +207,8 @@ int kthread_stop(struct task_struct *k)
206 /* It could exit after stop_info.k set, but before wake_up_process. */ 207 /* It could exit after stop_info.k set, but before wake_up_process. */
207 get_task_struct(k); 208 get_task_struct(k);
208 209
210 trace_sched_kthread_stop(k);
211
209 /* Must init completion *before* thread sees kthread_stop_info.k */ 212 /* Must init completion *before* thread sees kthread_stop_info.k */
210 init_completion(&kthread_stop_info.done); 213 init_completion(&kthread_stop_info.done);
211 smp_wmb(); 214 smp_wmb();
@@ -221,6 +224,8 @@ int kthread_stop(struct task_struct *k)
221 ret = kthread_stop_info.err; 224 ret = kthread_stop_info.err;
222 mutex_unlock(&kthread_stop_lock); 225 mutex_unlock(&kthread_stop_lock);
223 226
227 trace_sched_kthread_stop_ret(ret);
228
224 return ret; 229 return ret;
225} 230}
226EXPORT_SYMBOL(kthread_stop); 231EXPORT_SYMBOL(kthread_stop);