Skip to content
Snippets Groups Projects
  1. Apr 26, 2006
  2. Mar 27, 2006
  3. Mar 25, 2006
    • Andrew Morton's avatar
      [PATCH] find_task_by_pid() needs tasklist_lock · 05eeae20
      Andrew Morton authored
      
      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: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      05eeae20
  4. Mar 22, 2006
  5. Mar 15, 2006
  6. Mar 10, 2006
  7. Feb 24, 2006
  8. Feb 12, 2006
  9. Feb 10, 2006
  10. Feb 01, 2006
  11. Jan 19, 2006
Loading