login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2010
»
December
»
17
Re: [BUG?] memory hotplug: include/linux/radix-tree.h:145 invoked rcu_dereference_check() without protection!
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Eric Dumazet
Subject:
Re: [BUG?] memory hotplug: include/linux/radix-tree.h:145 invoked rcu_dereference_check() without protection!
Date: Thursday, December 16, 2010 - 10:59 pm
Le jeudi 16 décembre 2010 à 21:47 -0800, Paul E. McKenney a écrit :
quoted text
> On Fri, Dec 17, 2010 at 09:04:13AM +0900, Minchan Kim wrote: > > How about this? > > Maybe Paul have better idea. > > (It's apparently be word-wrapped.) > > > > diff --git a/include/linux/radix-tree.h b/include/linux/radix-tree.h > > index ab2baa5..135af1e 100644 > > --- a/include/linux/radix-tree.h > > +++ b/include/linux/radix-tree.h > > @@ -146,6 +146,20 @@ static inline void *radix_tree_deref_slot(void **pslot) > > } > > > > /** > > + * radix_tree_deref_slot_nocheck - dereference a slot without RCU check > > + * @pslot: pointer to slot, returned by radix_tree_lookup_slot > > + * Returns: item that was stored in that slot with any direct pointer flag > > + * removed. > > + * > > + * This functions works like radix_tree_deref_slot except it doesn't check > > + * RCU rule. Normally this funcion is used with update-side lock. > > + * You should use this function very carefully. > > + */ > > +static inline void *radix_tree_deref_slot_nocheck(void **pslot) > > +{ > > + return rcu_dereference_protected(*pslot, 1); > > I suggest replacing the "1" with lockdep expressions for the locks > that you say might be held: > > return rcu_dereference_check(*pslot, > lockdep_is_held(&mapping->tree_lock)); >
Yes, but point was also to use rcu_dereference_protected() here, not rcu_dereference_check().
quoted text
> This assumes that when you said "and" you meant both lock_page() and > mapping->tree_lock. Also you need to pass in the mapping, which > should not be a problem given likely inlining. > > If you meant that either mapping->tree_lock or page_lock() might be > held, I suppose that the page_lock() state could be passed in, but > perhaps better to take a general lockdep expression. > > So, either or both? ;-) >
Thanks --
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:
[BUG?] [Ext4] INFO: suspicious rcu_dereference_check() usage
, Arun Bhanu
, (Sun Nov 21, 4:26 am)
Re: [BUG?] [Ext4] INFO: suspicious rcu_dereference_check() ...
, Ted Ts'o
, (Sun Nov 21, 6:30 am)
Re: [BUG?] [Ext4] INFO: suspicious rcu_dereference_check() ...
, Minchan Kim
, (Sun Nov 21, 8:39 am)
Re: [BUG?] [Ext4] INFO: suspicious rcu_dereference_check() ...
, Ted Ts'o
, (Sun Nov 21, 10:37 am)
Re: [BUG?] [Ext4] INFO: suspicious rcu_dereference_check() ...
, Minchan Kim
, (Sun Nov 21, 5:38 pm)
Re: [BUG?] [Ext4] INFO: suspicious rcu_dereference_check() ...
, Milton Miller
, (Sun Nov 21, 8:31 pm)
Re: [BUG?] [Ext4] INFO: suspicious rcu_dereference_check() ...
, Paul E. McKenney
, (Sun Nov 21, 11:16 pm)
Re: [BUG?] [Ext4] INFO: suspicious rcu_dereference_check() ...
, KOSAKI Motohiro
, (Tue Nov 23, 12:16 am)
[BUG?] memory hotplug: include/linux/radix-tree.h:145 invo ...
, Gerald Schaefer
, (Tue Dec 7, 12:01 pm)
Re: [BUG?] memory hotplug: include/linux/radix-tree.h:145 ...
, KAMEZAWA Hiroyuki
, (Tue Dec 7, 6:19 pm)
Re: [BUG?] memory hotplug: include/linux/radix-tree.h:145 ...
, Gerald Schaefer
, (Thu Dec 16, 6:50 am)
Re: [BUG?] memory hotplug: include/linux/radix-tree.h:145 ...
, Minchan Kim
, (Thu Dec 16, 5:04 pm)
Re: [BUG?] memory hotplug: include/linux/radix-tree.h:145 ...
, Paul E. McKenney
, (Thu Dec 16, 10:47 pm)
Re: [BUG?] memory hotplug: include/linux/radix-tree.h:145 ...
, Eric Dumazet
, (Thu Dec 16, 10:59 pm)
Re: [BUG?] memory hotplug: include/linux/radix-tree.h:145 ...
, Mel Gorman
, (Fri Dec 17, 1:39 am)
Re: [BUG?] memory hotplug: include/linux/radix-tree.h:145 ...
, Mel Gorman
, (Fri Dec 17, 2:28 am)
Re: [BUG?] memory hotplug: include/linux/radix-tree.h:145 ...
, Minchan Kim
, (Fri Dec 17, 8:08 am)
Re: [BUG?] memory hotplug: include/linux/radix-tree.h:145 ...
, Minchan Kim
, (Fri Dec 17, 8:13 am)
Re: [BUG?] memory hotplug: include/linux/radix-tree.h:145 ...
, Minchan Kim
, (Fri Dec 17, 8:22 am)
Re: [BUG?] memory hotplug: include/linux/radix-tree.h:145 ...
, Paul E. McKenney
, (Fri Dec 17, 9:01 am)
Re: [BUG?] memory hotplug: include/linux/radix-tree.h:145 ...
, Paul E. McKenney
, (Fri Dec 17, 9:03 am)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Greg Kroah-Hartman
[PATCH 20/36] Driver core: Call device_pm_add() after bus_add_device() in device_a...
Oleg Nesterov
Re: init's children list is long and slows reaping children.
kogiidena
[PATCH 1/1] leds: LED Bitpattern Trigger
Stefan Richter
Re: [patch 00/04] RFC: Staging tree (drivers/staging)
David Miller
Re: [Ksummit-2008-discuss] Fixing the Kernel Janitors project
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
Anuj Gakhar
Git Architecture Question
Johannes Schindelin
Re: [PATCH] Fix approxidate("never") to always return 0
linux-netdev
:
Gerrit Renker
v2 [PATCH 1/4] dccp: Limit feature negotiation to connection setup phase
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...
Ingo Molnar
Re: [regression] nf_iterate(), BUG: unable to handle kernel NULL pointer dereference
Gerrit Renker
[PATCH 37/37] dccp: Debugging functions for feature negotiation
git-commits-head
:
Linux Kernel Mailing List
ath9k_htc: Allocate URBs properly
Linux Kernel Mailing List
[ARM] dma: use new dmabounce_sync_for_xxx() for dma_sync_single_xxx()
Linux Kernel Mailing List
MIPS: Cavium: Remove unused watchdog code.
Linux Kernel Mailing List
V4L/DVB (8976): af9015: Add USB ID for AVerMedia A309
Linux Kernel Mailing List
ARM: 5670/1: bcmring: add default configuration for bcmring arch
openbsd-misc
:
Christophe Rioux
Implementation example of snmp
Ryan McBride
Re: Packets Per Second Limit?
Nick Holland
Re: booting openbsd on eee without cd-rom
Bryan Irvine
Re: OpenBSD 4.7 Released, May 19 2010
Jacob Yocom-Piatt
Re: Same shit all over again
Colocation donated by:
Syndicate