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 5170D255F2D; Mon, 1 Dec 2025 11:32:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764588775; cv=none; b=ZMBnVgOqozLctW0bI/hQbD6klMkyxQZHpz5WUEO5GGv+OHb2yJwhNhdKwk8BTOTh89sjy57XqxljNzEo8kAoRD2KDIjvUmOkpoiiKK2NLa9r4Uff2Wz5oYezXN4WItmMyojj72r6JjOJ0pOiS9BW6Ffxtf86RhhXx8WK2rmS/l8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764588775; c=relaxed/simple; bh=attH4dAr9NzOTTUaoZWZWOhxMDjwqL2oh2hoUdrPrj0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=AfBhu9yVc2hJO0/TiOoZmZE1trcx0hRIOibsNh9oYlEeUTgQrAQZkerKxWyksr6RvwcXykvpVMfLbvM7vs8ASBD/0NJf3YZzE1RNDHEaijdlVQh3wqVMy+uLdpYJ6IjTGSAOHTx6vM3Af/LNg+FuvMSaTMk1kDCGDJRX1/RvQSk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=eAu2VnKe; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="eAu2VnKe" Received: by smtp.kernel.org (Postfix) with ESMTPSA id AEEA9C4CEF1; Mon, 1 Dec 2025 11:32:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1764588775; bh=attH4dAr9NzOTTUaoZWZWOhxMDjwqL2oh2hoUdrPrj0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eAu2VnKeY65CXUdlURZ0PTZ+T8o/0IAv6Vf8HdRyc0WyPLs4fz6fbkua+lbCvRLin pITBuYSeoHsdwGaLiwVyjHqMm0P3751sHmRUU5RbiJn6IP2mCpsYFGtlFLtQk042u2 vsSxpl2S/eyxdMqldAu7F/MckVdr8b57uTzyOi5Q= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Aswin Karuvally , Aleksei Nikiforov , Simon Horman , Jakub Kicinski , Sasha Levin Subject: [PATCH 5.4 167/187] s390/ctcm: Fix double-kfree Date: Mon, 1 Dec 2025 12:24:35 +0100 Message-ID: <20251201112247.244956936@linuxfoundation.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20251201112241.242614045@linuxfoundation.org> References: <20251201112241.242614045@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Aleksei Nikiforov [ Upstream commit da02a1824884d6c84c5e5b5ac373b0c9e3288ec2 ] The function 'mpc_rcvd_sweep_req(mpcginfo)' is called conditionally from function 'ctcmpc_unpack_skb'. It frees passed mpcginfo. After that a call to function 'kfree' in function 'ctcmpc_unpack_skb' frees it again. Remove 'kfree' call in function 'mpc_rcvd_sweep_req(mpcginfo)'. Bug detected by the clang static analyzer. Fixes: 0c0b20587b9f25a2 ("s390/ctcm: fix potential memory leak") Reviewed-by: Aswin Karuvally Signed-off-by: Aleksei Nikiforov Signed-off-by: Aswin Karuvally Reviewed-by: Simon Horman Link: https://patch.msgid.link/20251112182724.1109474-1-aswin@linux.ibm.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/s390/net/ctcm_mpc.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/s390/net/ctcm_mpc.c b/drivers/s390/net/ctcm_mpc.c index d766002bc5bee..e76b6e7f80ac5 100644 --- a/drivers/s390/net/ctcm_mpc.c +++ b/drivers/s390/net/ctcm_mpc.c @@ -712,7 +712,6 @@ static void mpc_rcvd_sweep_req(struct mpcg_info *mpcginfo) grp->sweep_req_pend_num--; ctcmpc_send_sweep_resp(ch); - kfree(mpcginfo); return; } -- 2.51.0