login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2010
»
August
»
20
Re: [PATCH] oom: __task_cred() need rcu_read_lock()
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
[view in full thread]
From: KOSAKI Motohiro
Subject:
Re: [PATCH] oom: __task_cred() need rcu_read_lock()
Date: Thursday, August 19, 2010 - 5:09 pm
> From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
quoted text
> > dump_tasks() needs to hold the RCU read lock around its access of the target > task's UID. To this end it should use task_uid() as it only needs that one > thing from the creds. > > The fact that dump_tasks() holds tasklist_lock is insufficient to prevent the > target process replacing its credentials on another CPU. > > Then, this patch change to call rcu_read_lock() explicitly. > > > =================================================== > [ INFO: suspicious rcu_dereference_check() usage. ] > --------------------------------------------------- > mm/oom_kill.c:410 invoked rcu_dereference_check() without protection! > > other info that might help us debug this: > > rcu_scheduler_active = 1, debug_locks = 1 > 4 locks held by kworker/1:2/651: > #0: (events){+.+.+.}, at: [<ffffffff8106aae7>] > process_one_work+0x137/0x4a0 > #1: (moom_work){+.+...}, at: [<ffffffff8106aae7>] > process_one_work+0x137/0x4a0 > #2: (tasklist_lock){.+.+..}, at: [<ffffffff810fafd4>] > out_of_memory+0x164/0x3f0 > #3: (&(&p->alloc_lock)->rlock){+.+...}, at: [<ffffffff810fa48e>] > find_lock_task_mm+0x2e/0x70 > > Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> > Signed-off-by: David Howells <dhowells@redhat.com> > --- > > mm/oom_kill.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/mm/oom_kill.c b/mm/oom_kill.c > index 5014e50..7b03102 100644 > --- a/mm/oom_kill.c > +++ b/mm/oom_kill.c > @@ -372,7 +372,7 @@ static void dump_tasks(const struct mem_cgroup *mem) > } > > pr_info("[%5d] %5d %5d %8lu %8lu %3u %3d %5d %s\n", > - task->pid, __task_cred(task)->uid, task->tgid, > + task->pid, task_uid(task), task->tgid, > task->mm->total_vm, get_mm_rss(task->mm), > task_cpu(task), task->signal->oom_adj, > task->signal->oom_score_adj, task->comm);
Thank you! --
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
Messages in current thread:
[PATCH] oom: __task_cred() need rcu_read_lock()
, David Howells
, (Thu Aug 19, 8:26 am)
Re: [PATCH] oom: __task_cred() need rcu_read_lock()
, Paul E. McKenney
, (Thu Aug 19, 8:51 am)
Re: [PATCH] oom: __task_cred() need rcu_read_lock()
, David Rientjes
, (Thu Aug 19, 1:34 pm)
Re: [PATCH] oom: __task_cred() need rcu_read_lock()
, KOSAKI Motohiro
, (Thu Aug 19, 5:09 pm)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
openmoko-community
:
Warren Baird
Re: consider buying Neo Freerunner
tom
Re: Internal pressure sensor
rakshat hooja
[Wikireader] Wikireader in India
Cédric Berger
Re: [android] Maps application
Michael Zanetti
Re: [android] SIM pin entry
netbsd-tech-kern
:
Andrew Doran
Re: Kernel modules
Thomas E. Spanjaard
Re: Bad side effect of "newdirpref"
Hans Petter Selasky
bus_dmamem question
Manuel Bouyer
Re: freebsd 5.99.41 as XEN3_DOMU
Matthias Buelow
Re: funlink() for fun!
freebsd-hackers
:
Joel Dahl
Re: Nvidia amd64
Bernd Walter
Re: Build world with DEBUG_FLAGS='-g -O0'
John Baldwin
Re: error 1 lba 752976 while booting from USB key to install
Garrett Cooper
Re: pkg_add doesn't keep dependent pkgs
Nate Eldredge
Re: Email sent from "at" command going to the wrong account
freebsd-bugs
:
Warren Block
Re: bin/139870: [regression]: sendmail(8): existing sendmail aliases ignored until...
FreeBSD bugmaster
Current problem reports
Jack Twilley
kern/131912: New devices using Silicon Labs chips - patches enclosed
Chistoph Weber-Fahr
misc/132553: ipfw doesnt understand ftp-data port
Oleg Gawriloff
misc/132250: ciss driver does not support more then 15 drives
madwifi-devel
:
David Overton
[PATCH] Use new get_wireless_stats handler in struct iw_handler_def
Aditya Bhave
[Madwifi-devel] Unable to configure MadWifi as a simple AP on Ubuntu
Prashant Alves
[PATCH] txpower: enable iwconfig <interface> txpower
Bruno Randolf
Re: [Madwifi-devel] mac80211 with madwifi
Michael Renzmann
Re: Support for AR5007EG
Colocation donated by:
Syndicate