From: tip-bot for Tejun Heo <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: edumazet@google.com, dipankar@in.ibm.com,
torvalds@linux-foundation.org, jiangshanlai@gmail.com,
bobby.prani@gmail.com, rostedt@goodmis.org, peterz@infradead.org,
linux-kernel@vger.kernel.org, mingo@kernel.org,
mathieu.desnoyers@efficios.com, dhowells@redhat.com,
hpa@zytor.com, dvhart@linux.intel.com, tj@kernel.org,
paulmck@linux.vnet.ibm.com, tglx@linutronix.de,
josh@joshtriplett.org, fweisbec@gmail.com, oleg@redhat.com,
patrick.marlier@gmail.com
Subject: [tip:core/rcu] fs/writeback, rcu: Don't use list_entry_rcu() for pointer offsetting in bdi_split_work_to_wbs()
Date: Wed, 28 Oct 2015 13:58:16 -0700 [thread overview]
Message-ID: <tip-b33e18f61bd18227a456016a77b1a968f5bc1d65@git.kernel.org> (raw)
In-Reply-To: <20151027051939.GA19355@mtj.duckdns.org>
Commit-ID: b33e18f61bd18227a456016a77b1a968f5bc1d65
Gitweb: http://git.kernel.org/tip/b33e18f61bd18227a456016a77b1a968f5bc1d65
Author: Tejun Heo <tj@kernel.org>
AuthorDate: Tue, 27 Oct 2015 14:19:39 +0900
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Wed, 28 Oct 2015 13:17:30 +0100
fs/writeback, rcu: Don't use list_entry_rcu() for pointer offsetting in bdi_split_work_to_wbs()
bdi_split_work_to_wbs() uses list_for_each_entry_rcu_continue()
to walk @bdi->wb_list. To set up the initial iteration
condition, it uses list_entry_rcu() to calculate the entry
pointer corresponding to the list head; however, this isn't an
actual RCU dereference and using list_entry_rcu() for it ended
up breaking a proposed list_entry_rcu() change because it was
feeding an non-lvalue pointer into the macro.
Don't use the RCU variant for simple pointer offsetting. Use
list_entry() instead.
Reported-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Darren Hart <dvhart@linux.intel.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Dipankar Sarma <dipankar@in.ibm.com>
Cc: Eric Dumazet <edumazet@google.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Josh Triplett <josh@joshtriplett.org>
Cc: Lai Jiangshan <jiangshanlai@gmail.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Patrick Marlier <patrick.marlier@gmail.com>
Cc: Paul McKenney <paulmck@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: pranith kumar <bobby.prani@gmail.com>
Link: http://lkml.kernel.org/r/20151027051939.GA19355@mtj.duckdns.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
fs/fs-writeback.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
index 29e4599..7378169 100644
--- a/fs/fs-writeback.c
+++ b/fs/fs-writeback.c
@@ -779,8 +779,8 @@ static void bdi_split_work_to_wbs(struct backing_dev_info *bdi,
bool skip_if_busy)
{
struct bdi_writeback *last_wb = NULL;
- struct bdi_writeback *wb = list_entry_rcu(&bdi->wb_list,
- struct bdi_writeback, bdi_node);
+ struct bdi_writeback *wb = list_entry(&bdi->wb_list,
+ struct bdi_writeback, bdi_node);
might_sleep();
restart:
next prev parent reply other threads:[~2015-10-28 20:59 UTC|newest]
Thread overview: 57+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-06 16:13 [PATCH tip/core/rcu 0/13] Miscellaneous fixes for 4.4 Paul E. McKenney
2015-10-06 16:13 ` [PATCH tip/core/rcu 01/13] sched: Export sched_setscheduler_nocheck Paul E. McKenney
2015-10-06 16:13 ` [PATCH tip/core/rcu 02/13] rcu: Use rcu_callback_t in call_rcu*() and friends Paul E. McKenney
2015-10-06 16:13 ` [PATCH tip/core/rcu 03/13] rcu: Use call_rcu_func_t to replace explicit type equivalents Paul E. McKenney
2015-10-06 16:13 ` [PATCH tip/core/rcu 04/13] rcu: Don't disable preemption for Tiny and Tree RCU readers Paul E. McKenney
2015-10-06 16:20 ` [Kernel networking modules.] OSI levels 2 & 3, Assistance - If anyone knows anyone in the US. North West region John D Allen, Leveridge Systems INC
2015-10-06 16:44 ` [PATCH tip/core/rcu 04/13] rcu: Don't disable preemption for Tiny and Tree RCU readers Josh Triplett
2015-10-06 17:01 ` Paul E. McKenney
2015-10-06 17:16 ` Josh Triplett
2015-10-06 17:42 ` Paul E. McKenney
2015-10-06 17:46 ` Josh Triplett
2015-10-06 20:05 ` Peter Zijlstra
2015-10-06 20:18 ` Paul E. McKenney
2015-10-06 20:52 ` Peter Zijlstra
2015-10-06 21:05 ` Paul E. McKenney
2015-10-07 7:19 ` Peter Zijlstra
2015-10-06 16:13 ` [PATCH tip/core/rcu 05/13] rcu: Eliminate panic when silly boot-time fanout specified Paul E. McKenney
2015-10-06 16:13 ` [PATCH tip/core/rcu 06/13] rcu: Add online/offline info to stall warning message Paul E. McKenney
2015-10-06 17:15 ` Josh Triplett
2015-10-06 16:13 ` [PATCH tip/core/rcu 07/13] rcu: Move preemption disabling out of __srcu_read_lock() Paul E. McKenney
2015-10-06 17:18 ` Josh Triplett
2015-10-06 17:36 ` Paul E. McKenney
2015-10-06 17:43 ` Josh Triplett
2015-10-06 18:07 ` Paul E. McKenney
2015-10-06 20:07 ` Peter Zijlstra
2015-10-06 20:19 ` Paul E. McKenney
2015-10-06 20:32 ` Peter Zijlstra
2015-10-06 21:03 ` Paul E. McKenney
2015-10-07 7:20 ` Peter Zijlstra
2015-10-07 14:18 ` Paul E. McKenney
2015-10-06 16:13 ` [PATCH tip/core/rcu 08/13] rcu: Finish folding ->fqs_state into ->gp_state Paul E. McKenney
2015-10-06 16:13 ` [PATCH tip/core/rcu 09/13] rcu: Correct comment for values of ->gp_state field Paul E. McKenney
2015-10-06 16:13 ` [PATCH tip/core/rcu 10/13] rcu: Add rcu_pointer_handoff() Paul E. McKenney
2015-10-06 17:21 ` Josh Triplett
2015-10-06 17:31 ` Paul E. McKenney
2015-10-06 17:36 ` Josh Triplett
2015-10-06 20:27 ` Peter Zijlstra
2015-10-06 21:02 ` Paul E. McKenney
2015-10-07 7:22 ` Peter Zijlstra
2015-10-07 14:20 ` Paul E. McKenney
2015-10-06 16:13 ` [PATCH tip/core/rcu 11/13] rculist: Make list_entry_rcu() use lockless_dereference() Paul E. McKenney
2015-10-26 8:45 ` Ingo Molnar
2015-10-26 14:55 ` Paul E. McKenney
2015-10-26 18:02 ` Ingo Molnar
2015-10-27 3:37 ` Linus Torvalds
2015-10-27 5:19 ` Tejun Heo
2015-10-27 5:33 ` Paul E. McKenney
2015-10-28 8:33 ` Ingo Molnar
2015-10-28 20:35 ` Patrick Marlier
2015-10-29 0:00 ` Paul E. McKenney
2015-10-29 2:13 ` Tejun Heo
2015-10-28 20:58 ` tip-bot for Tejun Heo [this message]
2015-10-27 5:32 ` Paul E. McKenney
2015-10-06 16:13 ` [PATCH tip/core/rcu 12/13] rcu: Remove deprecated rcu_lockdep_assert() Paul E. McKenney
2015-10-06 16:13 ` [PATCH tip/core/rcu 13/13] rculist: Use WRITE_ONCE() when deleting from reader-visible list Paul E. McKenney
2015-10-06 17:23 ` [PATCH tip/core/rcu 0/13] Miscellaneous fixes for 4.4 Josh Triplett
2015-10-06 17:38 ` 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=tip-b33e18f61bd18227a456016a77b1a968f5bc1d65@git.kernel.org \
--to=tipbot@zytor.com \
--cc=bobby.prani@gmail.com \
--cc=dhowells@redhat.com \
--cc=dipankar@in.ibm.com \
--cc=dvhart@linux.intel.com \
--cc=edumazet@google.com \
--cc=fweisbec@gmail.com \
--cc=hpa@zytor.com \
--cc=jiangshanlai@gmail.com \
--cc=josh@joshtriplett.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mingo@kernel.org \
--cc=oleg@redhat.com \
--cc=patrick.marlier@gmail.com \
--cc=paulmck@linux.vnet.ibm.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
--cc=tj@kernel.org \
--cc=torvalds@linux-foundation.org \
/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;
as well as URLs for NNTP newsgroup(s).