]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - mm/oom_kill.c
NSM: Use modern style for sm_name field in nsm_handle
[linux-2.6-omap-h63xx.git] / mm / oom_kill.c
index 3af787ba2077f1db1316048dc4dce011f663c5c4..558f9afe6e4e6b0085ddb51633a8b845e2518d18 100644 (file)
@@ -38,7 +38,6 @@ static DEFINE_SPINLOCK(zone_scan_mutex);
  * badness - calculate a numeric value for how bad this task has been
  * @p: task struct of which task we should calculate
  * @uptime: current uptime in seconds
- * @mem: target memory controller
  *
  * The formula used is relatively simple and documented inline in the
  * function. The main rationale is that we want to select a good task
@@ -295,12 +294,14 @@ static void dump_tasks(const struct mem_cgroup *mem)
                        continue;
                if (mem && !task_in_mem_cgroup(p, mem))
                        continue;
+               if (!thread_group_leader(p))
+                       continue;
 
                task_lock(p);
                printk(KERN_INFO "[%5d] %5d %5d %8lu %8lu %3d     %3d %s\n",
-                      p->pid, p->cred->uid, p->tgid, p->mm->total_vm,
-                      get_mm_rss(p->mm), (int)task_cpu(p), p->oomkilladj,
-                      p->comm);
+                      p->pid, __task_cred(p)->uid, p->tgid,
+                      p->mm->total_vm, get_mm_rss(p->mm), (int)task_cpu(p),
+                      p->oomkilladj, p->comm);
                task_unlock(p);
        } while_each_thread(g, p);
 }