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: <515C424B.2010405@gmail.com>
Date:	Wed, 03 Apr 2013 10:52:59 -0400
From:	Vlad Yasevich <vyasevich@...il.com>
To:	Wei Yongjun <weiyj.lk@...il.com>
CC:	sri@...ibm.com, nhorman@...driver.com, davem@...emloft.net,
	yongjun_wei@...ndmicro.com.cn, linux-sctp@...r.kernel.org,
	netdev@...r.kernel.org
Subject: Re: [PATCH -next] sctp: fix error return code in __sctp_connect()

On 04/03/2013 09:02 AM, Wei Yongjun wrote:
> From: Wei Yongjun <yongjun_wei@...ndmicro.com.cn>
>
> Fix to return a negative error code from the error handling
> case instead of 0, as returned elsewhere in this function.
>
> Signed-off-by: Wei Yongjun <yongjun_wei@...ndmicro.com.cn>

Acked-by: Vlad Yasevich <vyasevich@...il.com>

-vlad

> ---
>   net/sctp/socket.c | 5 +++--
>   1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/net/sctp/socket.c b/net/sctp/socket.c
> index dd21ae3..f631c5f 100644
> --- a/net/sctp/socket.c
> +++ b/net/sctp/socket.c
> @@ -1119,9 +1119,10 @@ static int __sctp_connect(struct sock* sk,
>   		/* Make sure the destination port is correctly set
>   		 * in all addresses.
>   		 */
> -		if (asoc && asoc->peer.port && asoc->peer.port != port)
> +		if (asoc && asoc->peer.port && asoc->peer.port != port) {
> +			err = -EINVAL;
>   			goto out_free;
> -
> +		}
>
>   		/* Check if there already is a matching association on the
>   		 * endpoint (other than the one created here).
>

--
To unsubscribe from this list: send the line "unsubscribe netdev" 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