aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorSteve French <sfrench@us.ibm.com>2008-04-17 19:38:45 -0400
committerSteve French <sfrench@us.ibm.com>2008-04-17 19:38:45 -0400
commit20e673810c69d18bee2ed74d19af3806ec2504f5 (patch)
tree7c22dc5246295a82f2688a23ae1c7f3a4f424302 /mm
parent8d142137b4fe87188f211042b16a5993964226f9 (diff)
parent4b119e21d0c66c22e8ca03df05d9de623d0eb50f (diff)
Merge branch 'master' of /pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'mm')
-rw-r--r--mm/oom_kill.c4
-rw-r--r--mm/sparse.c10
-rw-r--r--mm/vmstat.c1
3 files changed, 13 insertions, 2 deletions
diff --git a/mm/oom_kill.c b/mm/oom_kill.c
index f255eda693b0..beb592fe9389 100644
--- a/mm/oom_kill.c
+++ b/mm/oom_kill.c
@@ -423,7 +423,7 @@ void mem_cgroup_out_of_memory(struct mem_cgroup *mem, gfp_t gfp_mask)
423 struct task_struct *p; 423 struct task_struct *p;
424 424
425 cgroup_lock(); 425 cgroup_lock();
426 rcu_read_lock(); 426 read_lock(&tasklist_lock);
427retry: 427retry:
428 p = select_bad_process(&points, mem); 428 p = select_bad_process(&points, mem);
429 if (PTR_ERR(p) == -1UL) 429 if (PTR_ERR(p) == -1UL)
@@ -436,7 +436,7 @@ retry:
436 "Memory cgroup out of memory")) 436 "Memory cgroup out of memory"))
437 goto retry; 437 goto retry;
438out: 438out:
439 rcu_read_unlock(); 439 read_unlock(&tasklist_lock);
440 cgroup_unlock(); 440 cgroup_unlock();
441} 441}
442#endif 442#endif
diff --git a/mm/sparse.c b/mm/sparse.c
index f6a43c09c322..98d6b39c3472 100644
--- a/mm/sparse.c
+++ b/mm/sparse.c
@@ -149,8 +149,18 @@ static inline int sparse_early_nid(struct mem_section *section)
149/* Record a memory area against a node. */ 149/* Record a memory area against a node. */
150void __init memory_present(int nid, unsigned long start, unsigned long end) 150void __init memory_present(int nid, unsigned long start, unsigned long end)
151{ 151{
152 unsigned long max_arch_pfn = 1UL << (MAX_PHYSMEM_BITS-PAGE_SHIFT);
152 unsigned long pfn; 153 unsigned long pfn;
153 154
155 /*
156 * Sanity checks - do not allow an architecture to pass
157 * in larger pfns than the maximum scope of sparsemem:
158 */
159 if (start >= max_arch_pfn)
160 return;
161 if (end >= max_arch_pfn)
162 end = max_arch_pfn;
163
154 start &= PAGE_SECTION_MASK; 164 start &= PAGE_SECTION_MASK;
155 for (pfn = start; pfn < end; pfn += PAGES_PER_SECTION) { 165 for (pfn = start; pfn < end; pfn += PAGES_PER_SECTION) {
156 unsigned long section = pfn_to_section_nr(pfn); 166 unsigned long section = pfn_to_section_nr(pfn);
diff --git a/mm/vmstat.c b/mm/vmstat.c
index 422d960ffcd8..7c7286e9506d 100644
--- a/mm/vmstat.c
+++ b/mm/vmstat.c
@@ -388,6 +388,7 @@ static char * const migratetype_names[MIGRATE_TYPES] = {
388 "Reclaimable", 388 "Reclaimable",
389 "Movable", 389 "Movable",
390 "Reserve", 390 "Reserve",
391 "Isolate",
391}; 392};
392 393
393static void *frag_start(struct seq_file *m, loff_t *pos) 394static void *frag_start(struct seq_file *m, loff_t *pos)