From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0E06F746F for ; Sun, 17 Sep 2023 20:38:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6CE13C433C9; Sun, 17 Sep 2023 20:38:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1694983099; bh=FYBdQFSZ172m2LRT8j6ept8BBD9kR5mD3QeT6xtXkz8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DbNgg3SZiRTQrhxLVz1f1TWhbgSrARhLECxpIJHCAmtD69PQY77IEv4A9+sNHKqNB yrq0IBESSBtfWTFae3KncTG3CSUvBjtUCn5eD8RtLdbTYI5hZXWkCUdF4e78DJv59s Dr3H2HhJkXaCZybViuKQtKDh5uYxW34Lg7lVhbc0= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Shigeru Yoshida , Paolo Abeni , Sasha Levin Subject: [PATCH 5.15 444/511] kcm: Destroy mutex in kcm_exit_net() Date: Sun, 17 Sep 2023 21:14:31 +0200 Message-ID: <20230917191124.474935615@linuxfoundation.org> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230917191113.831992765@linuxfoundation.org> References: <20230917191113.831992765@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Shigeru Yoshida [ Upstream commit 6ad40b36cd3b04209e2d6c89d252c873d8082a59 ] kcm_exit_net() should call mutex_destroy() on knet->mutex. This is especially needed if CONFIG_DEBUG_MUTEXES is enabled. Fixes: ab7ac4eb9832 ("kcm: Kernel Connection Multiplexor module") Signed-off-by: Shigeru Yoshida Link: https://lore.kernel.org/r/20230902170708.1727999-1-syoshida@redhat.com Signed-off-by: Paolo Abeni Signed-off-by: Sasha Levin --- net/kcm/kcmsock.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/kcm/kcmsock.c b/net/kcm/kcmsock.c index 9c60c0c18b4dd..43005bba2d407 100644 --- a/net/kcm/kcmsock.c +++ b/net/kcm/kcmsock.c @@ -1982,6 +1982,8 @@ static __net_exit void kcm_exit_net(struct net *net) * that all multiplexors and psocks have been destroyed. */ WARN_ON(!list_empty(&knet->mux_list)); + + mutex_destroy(&knet->mutex); } static struct pernet_operations kcm_net_ops = { -- 2.40.1