int ret;  down(&kthread_stop_lock);   get_task_struct(k);   init_completion(&kthread_stop_info.done); smp_wmb();   kthread_stop_info.k = k; wake_up_process(k); put_task_struct(k);   wait_for_completion(&kthread_stop_info.done); kthread_stop_info.k = NULL; ret = kthread_stop_info.err; up(&kthread_stop_lock);  return ret;
return kthread_stop_sem(k, NULL);
int kthread_stop(struct task_struct *k){	int ret;	down(&kthread_stop_lock);	/* It could exit after stop_info.k set, but before wake_up_process. */	get_task_struct(k);	/* Must init completion *before* thread sees kthread_stop_info.k */	init_completion(&kthread_stop_info.done);	smp_wmb();	/* Now set kthread_should_stop() to true, and wake it up. */	kthread_stop_info.k = k;	wake_up_process(k);	put_task_struct(k);	/* Once it dies, reset stop ptr, gather result and we're done. */	wait_for_completion(&kthread_stop_info.done);	kthread_stop_info.k = NULL;	ret = kthread_stop_info.err;	up(&kthread_stop_lock);	return ret;}