lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 1 Jul 2010 16:46:24 +0200
From:	Oleg Nesterov <>
To:	Tejun Heo <>
Cc:	"Michael S. Tsirkin" <>,
	Peter Zijlstra <>,
	Ingo Molnar <>,
	Sridhar Samudrala <>,
	netdev <>,
	lkml <>,
	"" <>,
	Andrew Morton <>,
	Dmitri Vorobiev <>,
	Jiri Kosina <>,
	Thomas Gleixner <>,
	Andi Kleen <>
Subject: Re: [PATCH repost] sched: export sched_set/getaffinity to modules

On 07/01, Tejun Heo wrote:
> All that's necessary is shortcutting indirection through kthreadd.
> ie. An exported function which looks like the following,
>  struct kthread_clone_or_whatever(int (*threadfn).....)
>  {
> 	struct kthread_create_info create;
> 	int pid;
> 	INIT create;
> 	pid = kernel_thread(kthread, &create, CLONE_FS...);
> 	if (pid < 0)
> 		return ERROR;
> 	wait_for_completion(&create.done);
> 	if (!IS_ERR(create.result))
> 	return create.result;
>  }
> It might be a good idea to make the function take extra clone flags
> but anyways once created cloned task can be treated the same way as
> other kthreads, so nothing else needs to be changed.

This makes kthread_stop() work. Otherwise the new thread is just
the CLONE_VM child of the caller, and the caller is the user-mode
task doing ioctl() ?


To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to
More majordomo info at

Powered by blists - more mailing lists