public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
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 1/4] module: use rcu_read_lock() while walking over a RCU protected list
Date: Fri, 31 Jul 2015 19:14:57 +0200	[thread overview]
Message-ID: <20150731171457.GZ25159@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <1438362488-29857-2-git-send-email-bigeasy@linutronix.de>

On Fri, Jul 31, 2015 at 07:08:05PM +0200, Sebastian Andrzej Siewior wrote:
> The `modules' list uses list_for_each_entry_rcu() itarator.
> rcu_readlock() protects here against against module removal invoked from
> another CPU while preempt_disable() does not.

Not so, it does in fact.

> I don't understand what syncs in CONFIG_MODULES_TREE_LOOKUP against
> module removal. In the other (RCU) case there is synchronize_sched().

Its using rcu-sched aka preempt_disable.

if you want to use rcu primitives, use rcu_read_lock_sched(), but that
is in fact identical to preempt_disable().

Your patch breaks things.

  reply	other threads:[~2015-07-31 17:15 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 [this message]
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 ` [RFC 0/4] use rcu_read_lock() during module list walk Peter Zijlstra

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=20150731171457.GZ25159@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