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:   Mon, 12 Feb 2018 09:16:46 -0500
From:   Neil Horman <nhorman@...driver.com>
To:     Xin Long <lucien.xin@...il.com>
Cc:     network dev <netdev@...r.kernel.org>, linux-sctp@...r.kernel.org,
        davem@...emloft.net,
        Marcelo Ricardo Leitner <marcelo.leitner@...il.com>
Subject: Re: [PATCH net] sctp: remove the useless check in sctp_renege_events

On Mon, Feb 12, 2018 at 06:31:24PM +0800, Xin Long wrote:
> Remove the 'if (chunk)' check in sctp_renege_events for idata process,
> as all renege commands are generated in sctp_eat_data and it can't be
> NULL.
> 
> The same thing we already did for common data in sctp_ulpq_renege.
> 
> Fixes: 94014e8d871a ("sctp: implement renege_events for sctp_stream_interleave")
> Signed-off-by: Xin Long <lucien.xin@...il.com>
> ---
>  net/sctp/stream_interleave.c | 8 ++------
>  1 file changed, 2 insertions(+), 6 deletions(-)
> 
> diff --git a/net/sctp/stream_interleave.c b/net/sctp/stream_interleave.c
> index c19fd42..65ac03b 100644
> --- a/net/sctp/stream_interleave.c
> +++ b/net/sctp/stream_interleave.c
> @@ -955,12 +955,8 @@ static void sctp_renege_events(struct sctp_ulpq *ulpq, struct sctp_chunk *chunk,
>  	__u32 freed = 0;
>  	__u16 needed;
>  
> -	if (chunk) {
> -		needed = ntohs(chunk->chunk_hdr->length);
> -		needed -= sizeof(struct sctp_idata_chunk);
> -	} else {
> -		needed = SCTP_DEFAULT_MAXWINDOW;
> -	}
> +	needed = ntohs(chunk->chunk_hdr->length) -
> +		 sizeof(struct sctp_idata_chunk);
>  
>  	if (skb_queue_empty(&asoc->base.sk->sk_receive_queue)) {
>  		freed = sctp_ulpq_renege_list(ulpq, &ulpq->lobby, needed);
> -- 
> 2.1.0
> 
> 
Acked-by: Neil Horman <nhorman@...driver.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ