lkml.org 
[lkml]   [2022]   [Jun]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.18 764/879] dlm: uninitialized variable on error in dlm_listen_for_all()
    Date
    From: Dan Carpenter <dan.carpenter@oracle.com>

    commit 1f4f10845e14690b02410de50d9ea9684625a4ae upstream.

    The "sock" variable is not initialized on this error path.

    Cc: stable@vger.kernel.org
    Fixes: 2dc6b1158c28 ("fs: dlm: introduce generic listen")
    Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
    Signed-off-by: Alexander Aring <aahringo@redhat.com>
    Signed-off-by: David Teigland <teigland@redhat.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    ---
    fs/dlm/lowcomms.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    --- a/fs/dlm/lowcomms.c
    +++ b/fs/dlm/lowcomms.c
    @@ -1789,7 +1789,7 @@ static int dlm_listen_for_all(void)
    SOCK_STREAM, dlm_proto_ops->proto, &sock);
    if (result < 0) {
    log_print("Can't create comms socket: %d", result);
    - goto out;
    + return result;
    }

    sock_set_mark(sock->sk, dlm_config.ci_mark);

    \
     
     \ /
      Last update: 2022-06-08 03:46    [W:3.216 / U:0.100 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site