Andrew Morton 05eeae208d [PATCH] find_task_by_pid() needs tasklist_lock
A couple of places are forgetting to take it.

The kswapd case is probably unimportant.  keventd_create_kthread() was racy.

The whole thing is a bit flakey: you start a kernel thread, get its pid from
kernel_thread() then look up its task_struct.

a) It assumes that pid recycling takes a "long" time.

b) We get a task_struct but no reference was taken on it.  The owner of the
   kswapd and kthread task_struct*'s must assume that the new thread won't
   exit unexpectedly.  Because if it does, they're left holding dead memory
   and any attempt to control or stop that task will crash.

Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-25 08:22:57 -08:00
..
2006-03-23 07:38:10 -08:00
2006-01-11 18:42:13 -08:00
2006-01-18 19:20:30 -08:00
2006-02-24 14:05:47 +11:00
2005-04-16 15:20:36 -07:00
2006-03-23 07:38:11 -08:00
2005-04-16 15:20:36 -07:00
2005-10-30 17:37:32 -08:00
2006-01-11 18:42:13 -08:00
2005-10-08 15:00:57 -07:00
2006-03-23 07:38:12 -08:00
2006-03-25 08:22:52 -08:00
2006-01-09 15:59:19 -08:00
2006-01-08 20:13:40 -08:00
2006-03-23 07:38:10 -08:00
2006-03-23 07:38:10 -08:00
2006-03-25 08:22:52 -08:00
2005-04-16 15:20:36 -07:00
2006-01-11 18:42:13 -08:00
2006-03-24 07:33:20 -08:00
2005-04-16 15:20:36 -07:00