From: Vlad Yasevich <vyasevich@gmail.com>
To: Wei Yongjun <weiyj.lk@gmail.com>
Cc: sri@us.ibm.com, nhorman@tuxdriver.com, davem@davemloft.net,
yongjun_wei@trendmicro.com.cn, linux-sctp@vger.kernel.org,
netdev@vger.kernel.org
Subject: Re: [PATCH -next] sctp: fix error return code in __sctp_connect()
Date: Wed, 03 Apr 2013 10:52:59 -0400 [thread overview]
Message-ID: <515C424B.2010405@gmail.com> (raw)
In-Reply-To: <CAPgLHd-X5Qw64BnaSMr2ny6==jXGpRAYC7_1MGhP2v_GcVeApQ@mail.gmail.com>
On 04/03/2013 09:02 AM, Wei Yongjun wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.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@trendmicro.com.cn>
Acked-by: Vlad Yasevich <vyasevich@gmail.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).
>
next prev parent reply other threads:[~2013-04-03 14:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-03 13:02 [PATCH -next] sctp: fix error return code in __sctp_connect() Wei Yongjun
2013-04-03 13:51 ` Neil Horman
2013-04-03 14:52 ` Vlad Yasevich
2013-04-03 14:59 ` Neil Horman
2013-04-03 14:52 ` Vlad Yasevich [this message]
2013-04-07 21:04 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=515C424B.2010405@gmail.com \
--to=vyasevich@gmail.com \
--cc=davem@davemloft.net \
--cc=linux-sctp@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nhorman@tuxdriver.com \
--cc=sri@us.ibm.com \
--cc=weiyj.lk@gmail.com \
--cc=yongjun_wei@trendmicro.com.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).