lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5631319E.5000606@gmail.com>
Date:	Wed, 28 Oct 2015 21:35:42 +0100
From:	Patrick Marlier <patrick.marlier@...il.com>
To:	Ingo Molnar <mingo@...nel.org>, Tejun Heo <tj@...nel.org>
Cc:	Linus Torvalds <torvalds@...ux-foundation.org>,
	Paul McKenney <paulmck@...ux.vnet.ibm.com>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Lai Jiangshan <jiangshanlai@...il.com>,
	Dipankar Sarma <dipankar@...ibm.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
	Josh Triplett <josh@...htriplett.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Peter Zijlstra <peterz@...radead.org>,
	Steven Rostedt <rostedt@...dmis.org>,
	David Howells <dhowells@...hat.com>,
	Eric Dumazet <edumazet@...gle.com>,
	Darren Hart <dvhart@...ux.intel.com>,
	Frédéric Weisbecker <fweisbec@...il.com>,
	Oleg Nesterov <oleg@...hat.com>,
	pranith kumar <bobby.prani@...il.com>
Subject: Re: [PATCH tip/core/rcu 11/13] rculist: Make list_entry_rcu() use
 lockless_dereference()



On 10/28/2015 09:33 AM, Ingo Molnar wrote:
>
> * Tejun Heo <tj@...nel.org> wrote:
>
>> Subject: writeback: 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.
>>
>> Signed-off-by: Tejun Heo <tj@...nel.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();
>
> Any objections against me applying this fix to tip:core/rcu so that I can push the
> recent RCU changes towards linux-next without triggering a build failure?

No objection on my side but probably you are waiting for an ack from 
somebody else.
--
Pat
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ