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]
Date:   Tue, 28 Mar 2017 09:39:18 -0700
From:   Davidlohr Bueso <dave@...olabs.net>
To:     Laurent Dufour <ldufour@...ux.vnet.ibm.com>
Cc:     mingo@...nel.org, peterz@...radead.org, akpm@...ux-foundation.org,
        jack@...e.cz, kirill.shutemov@...ux.intel.com, mhocko@...e.com,
        mgorman@...hsingularity.net, linux-kernel@...r.kernel.org,
        Davidlohr Bueso <dbueso@...e.de>
Subject: Re: [PATCH 1/5] locking: Introduce range reader/writer lock

On Tue, 28 Mar 2017, Laurent Dufour wrote:
>> +#define __RANGE_RWLOCK_INITIALIZER(start, last) {	\
>> +		.node = {			\
>> +			.start = (start)	\
>> +			,.last = (last)		\
>> +		}				\
>> +	}
>
>Hi Davidlohr,
>
>This macro doesn't expand correctly because the field name ".start" is
>replaced by the start parameter. Should rather be :
>
>#define __RANGE_RWLOCK_INITIALIZER(__start, __last) {	\
>		.node = {			\
>			.start = (__start)	\
>			,.last = (__last)	\
>		}				\
>	}
>
>By the way, should the other fields set as in __range_rwlock_init() ?

Indeed.

>> +/*
>> + * lock for writing
>> + */
>> +void range_write_lock(struct range_rwlock_tree *tree, struct range_rwlock *lock);
>> +int range_write_lock_interruptible(struct range_rwlock_tree *tree,
>> +				   struct range_rwlock *lock);
>> +int range_write_lock_killable(struct range_rwlock_tree *tree,
>> +			      struct range_rwlock *lock);
>> +int range_read_trylock(struct range_rwlock_tree *tree, struct range_rwlock *lock);
>             ^^^^
>      range_write_trylock(...) isn't it ?
>

Duh, yeah.

I'll wait to see if there are any more concerns and send a v2 with your corrections.

Thanks,
Davidlohr

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ