dect
/
linux-2.6
Archived
13
0
Fork 0
This repository has been archived on 2022-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
linux-2.6/mm
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
..
Kconfig [PATCH] mm: make page migration dependent on swap and NUMA 2006-03-25 08:22:50 -08:00
Makefile [PATCH] page migration reorg 2006-03-22 07:54:06 -08:00
bootmem.c [PATCH] FRV: Clean up bootmem allocator's page freeing algorithm 2006-01-06 08:33:26 -08:00
fadvise.c [PATCH] fadvise(): write commands 2006-03-24 07:33:25 -08:00
filemap.c [PATCH] fadvise(): write commands 2006-03-24 07:33:25 -08:00
filemap.h
filemap_xip.c [PATCH] replace inode_update_time with file_update_time 2006-01-10 08:01:30 -08:00
fremap.c VM: add common helper function to create the page tables 2005-11-29 14:03:14 -08:00
highmem.c [PATCH] Block queue IO tracing support (blktrace) as of 2006-03-23 2006-03-23 20:00:26 +01:00
hugetlb.c [PATCH] mm: hugetlb alloc_fresh_huge_page bogus node loop fix 2006-03-22 07:54:06 -08:00
internal.h [PATCH] remove set_page_count() outside mm/ 2006-03-22 07:54:02 -08:00
madvise.c [PATCH] madvise MADV_DONTFORK/MADV_DOFORK 2006-02-14 16:09:34 -08:00
memory.c [PATCH] hugepage: Fix hugepage logic in free_pgtables() harder 2006-03-22 07:54:04 -08:00
memory_hotplug.c [PATCH] memory hotadd: pgdat->node_present_pages fix 2006-03-09 19:47:38 -08:00
mempolicy.c [PATCH] cpuset memory spread slab cache optimizations 2006-03-24 07:33:23 -08:00
mempool.c [PATCH] mm: kill kmem_cache_t usage 2006-03-22 07:53:58 -08:00
migrate.c [PATCH] page migration reorg 2006-03-22 07:54:06 -08:00
mincore.c
mlock.c [PATCH] move capable() to capability.h 2006-01-11 18:42:13 -08:00
mmap.c [PATCH] mm: use kmem_cache_zalloc 2006-03-25 08:22:49 -08:00
mprotect.c [PATCH] Enable mprotect on huge pages 2006-03-22 07:54:03 -08:00
mremap.c [PATCH] move capable() to capability.h 2006-01-11 18:42:13 -08:00
msync.c [PATCH] msync(): use do_fsync() 2006-03-24 07:33:27 -08:00
nommu.c [PATCH] mm: nommu use compound pages 2006-03-22 07:54:01 -08:00
oom_kill.c [PATCH] out_of_memory() locking fix 2006-03-02 08:33:07 -08:00
page-writeback.c [PATCH] set_page_dirty() return value fixes 2006-03-24 07:33:26 -08:00
page_alloc.c [PATCH] quieten zone_pcp_init 2006-03-25 08:22:50 -08:00
page_io.c
pdflush.c [PATCH] Swap Migration V5: PF_SWAPWRITE to allow writing to swap 2006-01-08 20:12:41 -08:00
prio_tree.c
readahead.c [PATCH] ext3_readdir: use generic readahead 2006-03-23 07:38:09 -08:00
rmap.c [PATCH] mm: more CONFIG_DEBUG_VM 2006-03-22 07:54:02 -08:00
shmem.c [PATCH] shmem: inline to avoid warning 2006-03-22 07:54:02 -08:00
slab.c [PATCH] slab: fix memory leak in alloc_kmemlist 2006-03-25 08:22:50 -08:00
slob.c [PATCH] slab: introduce kmem_cache_zalloc allocator 2006-03-25 08:22:49 -08:00
sparse.c [PATCH] Change maxaligned_in_smp alignemnt macros to internodealigned_in_smp macros 2006-01-08 20:13:38 -08:00
swap.c [PATCH] mm: less atomic ops 2006-03-22 07:53:57 -08:00
swap_state.c [PATCH] page migration reorg 2006-03-22 07:54:06 -08:00
swapfile.c [PATCH] swsusp: userland interface 2006-03-23 07:38:07 -08:00
thrash.c [PATCH] temporarily disable swap token on memory pressure 2005-11-28 14:42:25 -08:00
tiny-shmem.c [PATCH] do_truncate() call fix in tiny-shmem.c 2006-01-12 09:08:49 -08:00
truncate.c [PATCH] mutex subsystem, semaphore to mutex: VFS, ->i_sem 2006-01-09 15:59:24 -08:00
util.c [PATCH] slab: optimize constant-size kzalloc calls 2006-03-25 08:22:49 -08:00
vmalloc.c [PATCH] kernel-doc: fix warnings in vmalloc.c 2005-11-07 07:53:56 -08:00
vmscan.c [PATCH] find_task_by_pid() needs tasklist_lock 2006-03-25 08:22:57 -08:00