Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2206407iof; Tue, 7 Jun 2022 23:11:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw1d6DcAAoumLq8Aq/7pHBbFGsh32JIciP1Hu42v8jSUvoFAvRlDpPqJz2yFqXA8tLMj767 X-Received: by 2002:a17:902:f54e:b0:166:3b30:457c with SMTP id h14-20020a170902f54e00b001663b30457cmr32604913plf.1.1654668694276; Tue, 07 Jun 2022 23:11:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654668694; cv=none; d=google.com; s=arc-20160816; b=LYE4riE2uWMgJ4NhtzhjFbEHiyIa1pMJbiNITFWcK6c4y9Fb/QccAFC5VPgsYmuLi6 NaDqUMzO0vu1FfqLJwDoqNVmpCcIyYBAL3Ez2Mk5P5bTMn2yJbMalCgdrdXBEdJ+OMIb bU2ZXSmtnaKWDHUR5rIrLaYAQCHwobwyP+Ijag46BV9rb8JyfpWeF4xvqzYdBuS3QYOa i/OWn0TkBnxw2g9OO81u3RR+XWOD4GwCltpaMFYyL0nwsrruCrQY3QPh4/CcE6DiTZ0J Skwt1oAhgr8bzNpfGBLNFmav4UMfODpXr0pQMG6P+3X1llBSWGl8zNh517rHeEDdWBeX 34Mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=qozGMjwmCf5+Vf19VoURycFUrV3DGRhBz2wgVlW/Iaw=; b=ljOrOMbc9CVos0C7HAPNLAcumMhIYhsOmUmQ4NsGhBZK7J7fe6G07Mc5AgvXmTherk tkeJkeK7+k7JOjPckGZlul3Tl2Nw7VvLS5pYZPsTxUXIQUoFNgcxnHAZNh8ByT1aLYWc /P96ebYHL8Jd64t9IVW46QT7E8Cz/scj7BnG+H1u1aUHm5yKF7Lk3yc65Yn58xcDSsDY lEDUVVEcCzgC3fTTq7lOgsIQvNRYUducjDj1F47T4ka30LYJjauao+3FaNhLzG/yxqGk eanim7JQszYsyui45+AS0dp0HHCvKcE2mL56v87ZAMyOenkwrnB0oHJzhZQl8l5HKSIP MVkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=e1Se6G2r; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id mw5-20020a17090b4d0500b001e317fae3bcsi31176761pjb.78.2022.06.07.23.11.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 23:11:34 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=e1Se6G2r; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 2794A2C06A5; Tue, 7 Jun 2022 22:33:39 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1381298AbiFHBkn (ORCPT + 99 others); Tue, 7 Jun 2022 21:40:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49876 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1385443AbiFGWVi (ORCPT ); Tue, 7 Jun 2022 18:21:38 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BB6EB26A917; Tue, 7 Jun 2022 12:22:04 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id CF093B823D0; Tue, 7 Jun 2022 19:21:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 428DAC385A2; Tue, 7 Jun 2022 19:21:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654629716; bh=7sLA/FhS46xZIY8jbEiSKlbZkQ/X83iNGhrfEs3mqlg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=e1Se6G2rUupiH7hwQfxH/VqRkaG8b1rXurrxffj1MlmmC0MalKnKzWxvCQzwyopt7 z1f1KESoEv/8BExx4xif1l1z31ROxTvWtHxkLXu+ncKZhOsMI+nZiVvlr7EbWJhMQr onM3EuI7R3ThW3FArbOpqHreOjb5dFWMyIUYlFug= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dan Carpenter , Alexander Aring , David Teigland Subject: [PATCH 5.18 764/879] dlm: uninitialized variable on error in dlm_listen_for_all() Date: Tue, 7 Jun 2022 19:04:42 +0200 Message-Id: <20220607165025.040146496@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220607165002.659942637@linuxfoundation.org> References: <20220607165002.659942637@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Dan Carpenter 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 Signed-off-by: Alexander Aring Signed-off-by: David Teigland Signed-off-by: Greg Kroah-Hartman --- 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);