login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2010
»
August
»
19
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: Paul E. McKenney
Subject:
Re: [PATCH] oom: __task_cred() need rcu_read_lock()
Date: Thursday, August 19, 2010 - 8:51 am
On Thu, Aug 19, 2010 at 04:26:18PM +0100, David Howells wrote:
quoted text
> From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> > > 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>
Looks good to me! Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
quoted text
> --- > > 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); >
--
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
linux-kernel
:
Trent Waddington
Re: Gaming Interface
Takashi Iwai
Re: [PATCH] usb: usbmixer error path fix
Jeremy Fitzhardinge
Re: [patch 1/6] Re-enable VDSO by default with PARAVIRT
Paul E. McKenney
Re: [PATCH, RFC] v4 scalable classic RCU implementation
Greg Kroah-Hartman
[PATCH 20/36] Driver core: Call device_pm_add() after bus_add_device() in device_a...
git
:
Stephen R. van den Berg
Re: [RFC] origin link for cherry-pick and revert
Christian Stimming
git-gui: Fix broken revert confirmation.
Junio C Hamano
Re: git-svnimport
Mark Burton
Re: [PATCH] builtin-branch: highlight current remote branches with an asterisk
Johannes Schindelin
Re: [PATCH] Fix approxidate("never") to always return 0
git-commits-head
:
Linux Kernel Mailing List
ath9k_htc: Allocate URBs properly
Linux Kernel Mailing List
bnx2x: Fan failure mechanism on additional design
Linux Kernel Mailing List
cpumask: make irq_set_affinity() take a const struct cpumask
Linux Kernel Mailing List
ARM: 5670/1: bcmring: add default configuration for bcmring arch
Linux Kernel Mailing List
ahci: Workaround HW bug for SB600/700 SATA controller PMP support
linux-netdev
:
Nick Piggin
Re: Kernel WARNING: at net/core/dev.c:1330 __netif_schedule+0x2c/0x98()
Daniel Lezcano
getsockopt(TCP_DEFER_ACCEPT) value change
David Miller
Re: 2.6.27.18: bnx2/tg3: BUG: "scheduling while atomic" trying to ifenslave a seco...
Amit Kumar Salecha
[PATCH NEXT 10/10] qlcnic: add cksum flag
Ingo Molnar
Re: [regression] nf_iterate(), BUG: unable to handle kernel NULL pointer dereference
openbsd-misc
:
James Hozier
Re: DVD burn error: No space left on device
Christophe Rioux
Implementation example of snmp
Ryan McBride
Re: Packets Per Second Limit?
Nick Holland
Re: booting openbsd on eee without cd-rom
Very Fashion.com
Very-fashion.com -Novo! Brendirana garderoba po najpovoljnijim cenama.Bisou Bisou ...
Colocation donated by:
Syndicate