lkml.org 
[lkml]   [2011]   [Mar]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[08/87] sunrpc: Propagate errors from xs_bind() through xs_create_sock()
    2.6.37-stable review patch.  If anyone has any objections, please let us know.

    ------------------

    From: Ben Hutchings <bhutchings@solarflare.com>

    commit 4cea288aaf0e11647880cc487350b1dc45d9febc upstream.

    xs_create_sock() is supposed to return a pointer or an ERR_PTR-encoded
    error, but it currently returns 0 if xs_bind() fails.

    Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
    Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

    ---
    net/sunrpc/xprtsock.c | 3 ++-
    1 file changed, 2 insertions(+), 1 deletion(-)

    --- a/net/sunrpc/xprtsock.c
    +++ b/net/sunrpc/xprtsock.c
    @@ -1631,7 +1631,8 @@ static struct socket *xs_create_sock(str
    }
    xs_reclassify_socket(family, sock);

    - if (xs_bind(transport, sock)) {
    + err = xs_bind(transport, sock);
    + if (err) {
    sock_release(sock);
    goto out;
    }



    \
     
     \ /
      Last update: 2011-03-22 00:57    [W:0.021 / U:0.172 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site