mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* problem with "Use CLONE_KERNEL for the common kernel thread flags"?
@ 2002-09-15 21:54 Matthew Wilcox
  2002-09-15 21:56 ` Ingo Molnar
  2002-09-15 23:59 ` Linus Torvalds
  0 siblings, 2 replies; 3+ messages in thread
From: Matthew Wilcox @ 2002-09-15 21:54 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: mingo, linux-kernel


Seems to me like you missed something in your latest changeset:

-#define CLONE_SIGNAL   (CLONE_SIGHAND | CLONE_THREAD)
+#define CLONE_KERNEL   (CLONE_FS | CLONE_FILES | CLONE_SIGHAND)
-       kernel_thread(init, NULL, CLONE_FS | CLONE_FILES | CLONE_SIGNAL);
+       kernel_thread(init, NULL, CLONE_KERNEL);

init used to be spawned with CLONE_THREAD and no longer is.  Was this
intentional?  The changelog entry didn't indicate it, and I haven't
been keeping track of what all the CLONE flags mean these days so I'm
not sure if this is safe.

-- 
Revolutions do not require corporate support.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: problem with "Use CLONE_KERNEL for the common kernel thread flags"?
  2002-09-15 21:54 problem with "Use CLONE_KERNEL for the common kernel thread flags"? Matthew Wilcox
@ 2002-09-15 21:56 ` Ingo Molnar
  2002-09-15 23:59 ` Linus Torvalds
  1 sibling, 0 replies; 3+ messages in thread
From: Ingo Molnar @ 2002-09-15 21:56 UTC (permalink / raw)
  To: Matthew Wilcox; +Cc: Linus Torvalds, linux-kernel


On Sun, 15 Sep 2002, Matthew Wilcox wrote:

> -#define CLONE_SIGNAL   (CLONE_SIGHAND | CLONE_THREAD)
> +#define CLONE_KERNEL   (CLONE_FS | CLONE_FILES | CLONE_SIGHAND)
> -       kernel_thread(init, NULL, CLONE_FS | CLONE_FILES | CLONE_SIGNAL);
> +       kernel_thread(init, NULL, CLONE_KERNEL);
> 
> init used to be spawned with CLONE_THREAD and no longer is.  Was this
> intentional? [...]

i think Linus combined a cleanup with the fix i sent earlier today, so
this does look intentional.

	Ingo


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: problem with "Use CLONE_KERNEL for the common kernel thread flags"?
  2002-09-15 21:54 problem with "Use CLONE_KERNEL for the common kernel thread flags"? Matthew Wilcox
  2002-09-15 21:56 ` Ingo Molnar
@ 2002-09-15 23:59 ` Linus Torvalds
  1 sibling, 0 replies; 3+ messages in thread
From: Linus Torvalds @ 2002-09-15 23:59 UTC (permalink / raw)
  To: Matthew Wilcox; +Cc: mingo, linux-kernel


On Sun, 15 Sep 2002, Matthew Wilcox wrote:
> 
> Seems to me like you missed something in your latest changeset:
> 
> -#define CLONE_SIGNAL   (CLONE_SIGHAND | CLONE_THREAD)
> +#define CLONE_KERNEL   (CLONE_FS | CLONE_FILES | CLONE_SIGHAND)
> -       kernel_thread(init, NULL, CLONE_FS | CLONE_FILES | CLONE_SIGNAL);
> +       kernel_thread(init, NULL, CLONE_KERNEL);
> 
> init used to be spawned with CLONE_THREAD and no longer is.  Was this
> intentional?

Yup. CLONE_THREAD has some new semantics these days, and is not
necessarily at all what a kernel thread wants any more. It used to not
matter at all, but these days it means that it gets put on the same thread
group list as the parent, which means that it won't show up on the global
list of processes any more (since it is considered a "subthread" of the
thread group leader).

		Linus


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-09-15 23:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-15 21:54 problem with "Use CLONE_KERNEL for the common kernel thread flags"? Matthew Wilcox
2002-09-15 21:56 ` Ingo Molnar
2002-09-15 23:59 ` Linus Torvalds

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®