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: <20160905124004.GA27658@localhost.localdomain>
Date:   Mon, 5 Sep 2016 09:40:04 -0300
From:   marcelo.leitner@...il.com
To:     Christophe JAILLET <christophe.jaillet@...adoo.fr>
Cc:     vyasevich@...il.com, nhorman@...driver.com, davem@...emloft.net,
        linux-sctp@...r.kernel.org, linux-kernel@...r.kernel.org,
        kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] sctp: Remove some redundant code

On Sun, Sep 04, 2016 at 11:38:13AM +0200, Christophe JAILLET wrote:
> In commit 311b21774f13 ("sctp: simplify sk_receive_queue locking"), a call
> to 'skb_queue_splice_tail_init()' has been made explicit. Previously it was
> hidden in 'sctp_skb_list_tail()'
> 
> Now, the code around it looks redundant. The '_init()' part of
> 'skb_queue_splice_tail_init()' should alreday do the same.

Nice

> 
> Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
> ---
> Un-tested

Okay. It seems good to me but I'll give this a run after lunch anyway.
Thanks

> ---
>  net/sctp/ulpqueue.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/net/sctp/ulpqueue.c b/net/sctp/ulpqueue.c
> index 877e55066f89..84d0fdaf7de9 100644
> --- a/net/sctp/ulpqueue.c
> +++ b/net/sctp/ulpqueue.c
> @@ -140,11 +140,8 @@ int sctp_clear_pd(struct sock *sk, struct sctp_association *asoc)
>  		 * we can go ahead and clear out the lobby in one shot
>  		 */
>  		if (!skb_queue_empty(&sp->pd_lobby)) {
> -			struct list_head *list;
>  			skb_queue_splice_tail_init(&sp->pd_lobby,
>  						   &sk->sk_receive_queue);
> -			list = (struct list_head *)&sctp_sk(sk)->pd_lobby;
> -			INIT_LIST_HEAD(list);
>  			return 1;
>  		}
>  	} else {
> -- 
> 2.7.4
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sctp" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ