[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.2.00.0912111452360.3089@localhost.localdomain>
Date: Fri, 11 Dec 2009 14:52:48 +0100 (CET)
From: Thomas Gleixner <tglx@...utronix.de>
To: David Howells <dhowells@...hat.com>
cc: LKML <linux-kernel@...r.kernel.org>,
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
Dipankar Sarma <dipankar@...ibm.com>,
Ingo Molnar <mingo@...e.hu>,
Peter Zijlstra <peterz@...radead.org>,
Oleg Nesterov <oleg@...sign.ru>,
Al Viro <viro@...iv.linux.org.uk>,
James Morris <jmorris@...ei.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
linux-mm@...ck.org
Subject: Re: [patch 4/9] oom: Add missing rcu protection of __task_cred() in
dump_tasks
On Fri, 11 Dec 2009, David Howells wrote:
> Thomas Gleixner <tglx@...utronix.de> wrote:
>
> > + /* Protect __task_cred() access */
> > + rcu_read_lock();
> > printk(KERN_INFO "[%5d] %5d %5d %8lu %8lu %3d %3d %s\n",
> > p->pid, __task_cred(p)->uid, p->tgid, mm->total_vm,
> > get_mm_rss(mm), (int)task_cpu(p), p->signal->oom_adj,
> > p->comm);
> > + rcu_read_unlock();
>
> No. If there's only one access to __task_cred() like this, use
> task_cred_xxx() or one of its wrappers instead:
>
> - p->pid, __task_cred(p)->uid, p->tgid, mm->total_vm,
> + p->pid, task_uid(p), p->tgid, mm->total_vm,
>
> that limits the size of the critical section.
Fair enough.
tglx
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists