From: Mike Snitzer <snitzer@redhat.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: "Pranith Kumar" <bobby.prani@gmail.com>,
dm-devel@redhat.com, "Kirill A. Shutemov" <kirill@shutemov.name>,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
LKML <linux-kernel@vger.kernel.org>,
"Ingo Molnar" <mingo@kernel.org>,
"Lai Jiangshan" <laijs@cn.fujitsu.com>,
"Dipankar Sarma" <dipankar@in.ibm.com>,
"Andrew Morton" <akpm@linux-foundation.org>,
"Mathieu Desnoyers" <mathieu.desnoyers@efficios.com>,
"Josh Triplett" <josh@joshtriplett.org>,
"Thomas Gleixner" <tglx@linutronix.de>,
"Peter Zijlstra" <peterz@infradead.org>,
"Steven Rostedt" <rostedt@goodmis.org>,
"David Howells" <dhowells@redhat.com>,
"Eric Dumazet" <edumazet@google.com>,
dvhart@linux.intel.com,
"Frédéric Weisbecker" <fweisbec@gmail.com>,
"Oleg Nesterov" <oleg@redhat.com>
Subject: Re: [PATCH v2] drivers/md: use proper rcu accessor
Date: Sun, 23 Nov 2014 23:09:04 -0500 [thread overview]
Message-ID: <20141124040903.GB595@redhat.com> (raw)
In-Reply-To: <1416764069.17888.36.camel@edumazet-glaptop2.roam.corp.google.com>
On Sun, Nov 23 2014 at 12:34pm -0500,
Eric Dumazet <eric.dumazet@gmail.com> wrote:
> From: Eric Dumazet <edumazet@google.com>
>
> rcu_dereference() should be used in sections protected by rcu_read_lock.
>
> For writers, holding some kind of mutex or lock,
> rcu_dereference_protected() is the way to go, adding explicit lockdep
> bits.
>
> In __unbind(), we are the last user of this mapped device, so can use
> the constant '1' instead of a lockdep_is_held(), not consistent with
> other uses of rcu_dereference_protected() which use md->suspend_lock
> mutex.
>
> Reported-by: Kirill A. Shutemov <kirill@shutemov.name>
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> Fixes: 33423974bfc1 ("dm: Use rcu_dereference() for accessing rcu pointer")
> Cc: Pranith Kumar <bobby.prani@gmail.com>
> Cc: Mike Snitzer <snitzer@redhat.com>
Thanks, I've staged this for 3.19:
https://git.kernel.org/cgit/linux/kernel/git/device-mapper/linux-dm.git/commit/?h=dm-for-3.19&id=a12f5d48bdfeb5fe10157ac01c3de29269f457c6
next prev parent reply other threads:[~2014-11-24 4:10 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-28 22:09 [PATCH tip/core/rcu 0/9] Miscellaneous fixes for 3.19 Paul E. McKenney
2014-10-28 22:09 ` [PATCH tip/core/rcu 1/9] rcu: Remove CONFIG_RCU_CPU_STALL_VERBOSE Paul E. McKenney
2014-10-28 22:09 ` [PATCH tip/core/rcu 2/9] compiler: Allow 1- and 2-byte smp_load_acquire() and smp_store_release() Paul E. McKenney
2014-10-28 22:09 ` [PATCH tip/core/rcu 3/9] drivers/md: Use rcu_dereference() for accessing rcu pointer Paul E. McKenney
2014-11-21 13:31 ` Kirill A. Shutemov
2014-11-21 14:30 ` Pranith Kumar
2014-11-21 14:58 ` Kirill A. Shutemov
2014-11-23 12:21 ` Pranith Kumar
2014-11-23 16:39 ` Eric Dumazet
2014-11-23 16:40 ` [PATCH ] drivers/md: use proper rcu accessor Eric Dumazet
2014-11-23 16:53 ` Mike Snitzer
2014-11-23 17:31 ` Eric Dumazet
2014-11-23 19:12 ` Mike Snitzer
2014-11-23 17:34 ` [PATCH v2] " Eric Dumazet
2014-11-24 4:09 ` Mike Snitzer [this message]
2014-10-28 22:09 ` [PATCH tip/core/rcu 4/9] dm: sparse: Annotate field with __rcu for checking Paul E. McKenney
2014-10-28 22:09 ` [PATCH tip/core/rcu 5/9] rcu: Add sparse check for RCU_INIT_POINTER() Paul E. McKenney
2014-10-28 22:09 ` [PATCH tip/core/rcu 6/9] rcu: Optimize cond_resched_rcu_qs() Paul E. McKenney
2014-10-28 22:10 ` [PATCH tip/core/rcu 7/9] rcu: More info about potential deadlocks with rcu_read_unlock() Paul E. McKenney
2014-10-28 22:10 ` [PATCH tip/core/rcu 8/9] rcu: Fix FIXME in rcu_tasks_kthread() Paul E. McKenney
2014-10-28 22:10 ` [PATCH tip/core/rcu 9/9] rcu: Provide counterpart to rcu_dereference() for non-RCU situations Paul E. McKenney
2014-10-29 10:57 ` Peter Zijlstra
2014-10-29 12:42 ` Paul E. McKenney
2014-10-29 19:15 ` Oleg Nesterov
2014-10-29 18:43 ` Paul E. McKenney
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=20141124040903.GB595@redhat.com \
--to=snitzer@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=bobby.prani@gmail.com \
--cc=dhowells@redhat.com \
--cc=dipankar@in.ibm.com \
--cc=dm-devel@redhat.com \
--cc=dvhart@linux.intel.com \
--cc=edumazet@google.com \
--cc=eric.dumazet@gmail.com \
--cc=fweisbec@gmail.com \
--cc=josh@joshtriplett.org \
--cc=kirill@shutemov.name \
--cc=laijs@cn.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mingo@kernel.org \
--cc=oleg@redhat.com \
--cc=paulmck@linux.vnet.ibm.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--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