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  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sun, 4 Sep 2016 17:57:20 +0200
From:   Christophe JAILLET <christophe.jaillet@...adoo.fr>
To:     Leon Romanovsky <leon@...nel.org>
Cc:     santosh.shilimkar@...cle.com, davem@...emloft.net,
        linux-rdma@...r.kernel.org, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] RDS: Simplify code

Le 04/09/2016 à 14:20, Leon Romanovsky a écrit :
> On Sat, Sep 03, 2016 at 07:33:29AM +0200, Christophe JAILLET wrote:
>> Calling 'list_splice' followed by 'INIT_LIST_HEAD' is equivalent to
>> 'list_splice_init'.
> It is not 100% accurate
>
> list_splice(y, z)
> INIT_LIST_HEAD(y)
>
> ==>
>
> if (!list_empty(y))
>       __list_splice(y, z, z>next);
> INIT_LIST_HEAD(y)
>
> and not
>
> if (!list_empty(y)) {
>       __list_splice(y, z, z>next);
>       INIT_LIST_HEAD(y)
> }
>
> as list_splice_init will do.
>
You are right but if you dig further you will see that calling 
INIT_LIST_HEAD on an empty list is a no-op (AFAIK).
And if this list was not already correctly initialized, then you would 
have some other troubles.

CJ

Powered by blists - more mailing lists