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] [day] [month] [year] [list]
Date:	Mon, 04 Mar 2013 09:20:55 -0500
From:	Sasha Levin <sasha.levin@...cle.com>
To:	Paul Bolle <pebolle@...cali.nl>
CC:	Peter Senna Tschudin <peter.senna@...il.com>,
	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
	Wu Fengguang <fengguang.wu@...el.com>,
	Marcelo Tosatti <mtosatti@...hat.com>,
	Gleb Natapov <gleb@...hat.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] hlist: drop the node parameter from iterators

On 03/04/2013 05:41 AM, Paul Bolle wrote:
> On Wed, 2013-01-30 at 21:00 -0500, Sasha Levin wrote:
>> I'm not sure why, but the hlist for each entry iterators were conceived
>> differently from the list ones. While the list ones are nice and elegant:
>>
>>         list_for_each_entry(pos, head, member)
>>
>> The hlist ones were greedy and wanted an extra parameter:
>>
>>         hlist_for_each_entry(tpos, pos, head, member)
>>
>> Why did they need an extra pos parameter? I'm not quite sure. Not only
>> they don't really need it, it also prevents the iterator from looking
>> exactly like the list iterator, which is unfortunate.
>>
>> Besides the semantic patch, there was some manual work required:
>>
>>  - Fix up the actual hlist iterators in linux/list.h
>>  - Fix up the declaration of other iterators based on the hlist ones.
>>  - A very small amount of places were using the 'node' parameter, this
>>  was modified to use 'obj->member' instead.
>>  - Coccinelle didn't handle the hlist_for_each_entry_safe iterator
>>  properly, so those had to be fixed up manually.
> 
> This patch seems to have become commit
> b67bfe0d42cac56c512dd5da4b1b347a23f4b70a in v3.9-rc1. It triggers this
> (obviously correct) warning:
>     net/9p/trans_virtio.c:350:1: warning: ‘p9_virtio_zc_request’ defined but not used [-Wunused-function]
> 
>> diff --git a/net/9p/trans_virtio.c b/net/9p/trans_virtio.c
>> index fd05c81..d7a3fe3 100644
>> --- a/net/9p/trans_virtio.c
>> +++ b/net/9p/trans_virtio.c
>> @@ -655,7 +655,7 @@ static struct p9_trans_module p9_virtio_trans = {
>>  	.create = p9_virtio_create,
>>  	.close = p9_virtio_close,
>>  	.request = p9_virtio_request,
>> -	.zc_request = p9_virtio_zc_request,
>> +	//.zc_request = p9_virtio_zc_request,
>>  	.cancel = p9_virtio_cancel,
>>  	/*
>>  	 * We leave one entry for input and one entry for response
> 
> Why was that line commented out? There's no comment nor is there
> anything in the commit explanation on this change.

uh... what.

I'm not sure what happened there, I'll send a patch to fix it though.

Thanks for the catch!

--
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