From: Peter Zijlstra <peterz@infradead.org>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: linux-kernel@vger.kernel.org,
Rusty Russell <rusty@rustcorp.com.au>,
Ananth N Mavinakayanahalli <ananth@in.ibm.com>,
Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>,
tglx@linutronix.de
Subject: Re: [RFC 0/4] use rcu_read_lock() during module list walk
Date: Fri, 31 Jul 2015 19:22:46 +0200 [thread overview]
Message-ID: <20150731172246.GB25159@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <1438362488-29857-1-git-send-email-bigeasy@linutronix.de>
On Fri, Jul 31, 2015 at 07:08:04PM +0200, Sebastian Andrzej Siewior wrote:
> Hi Peter,
>
> this series was made before I noticed that you introduced a RB tree for
> lookup but the old way still remains under !CONFIG_MODULES_TREE_LOOKUP.
> In the old way the caller had preempt_disable() while invoking
> list_for_each_safe_rcu() which is (according to the RCU checklist) not a
> substitute for rcu_readlock().
This is true. preempt_disable() != rcu_read_lock().
> With your CONFIG_MODULES_TREE_LOOKUP I fail to understand what blocks
> free_module() until all mod_find() callers have dropped their refrence to
> the obtained struct mod. We had synchronize_sched() in RCU case.
We still have synchronize_sched(), but that is not RCU, that is
RCU-sched, and rcu_read_lock_sched() == preempt_disable() (+- some
debugging bits).
The code used to be broken in this regard, see 0be964be0d45 ("module:
Sanitize RCU usage and locking"), that fixed things to be consistent.
prev parent reply other threads:[~2015-07-31 17:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-31 17:08 [RFC 0/4] use rcu_read_lock() during module list walk Sebastian Andrzej Siewior
2015-07-31 17:08 ` [RFC 1/4] module: use rcu_read_lock() while walking over a RCU protected list Sebastian Andrzej Siewior
2015-07-31 17:14 ` Peter Zijlstra
2015-07-31 17:08 ` [RFC 2/4] jump_label: use rcu_read_lock() while accessing __module_*() Sebastian Andrzej Siewior
2015-07-31 17:16 ` Peter Zijlstra
2015-07-31 17:08 ` [RFC 3/4] kprobes: Add a RCU lock while invoking __module_text_address() Sebastian Andrzej Siewior
2015-07-31 17:08 ` [RFC 4/4] kprobe: remove preempt_disable() from check_kprobe_address_safe() Sebastian Andrzej Siewior
2015-07-31 17:22 ` Peter Zijlstra [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150731172246.GB25159@twins.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=ananth@in.ibm.com \
--cc=anil.s.keshavamurthy@intel.com \
--cc=bigeasy@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox