From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 69476C433F5 for ; Mon, 31 Jan 2022 11:32:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1359621AbiAaLc2 (ORCPT ); Mon, 31 Jan 2022 06:32:28 -0500 Received: from ams.source.kernel.org ([145.40.68.75]:40904 "EHLO ams.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377066AbiAaLW2 (ORCPT ); Mon, 31 Jan 2022 06:22:28 -0500 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 63A3FB82A74; Mon, 31 Jan 2022 11:22:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7DA84C340E8; Mon, 31 Jan 2022 11:22:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643628146; bh=KeSCS5JSeW0z2O3YsGsaW4UWS4R/ZiOqcq2qFNg7iRg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oR8TnpEEWwrybB3I1mALK9pZNBRO1gIKTzDPbZx8d8fo5aOBWMCnKIQqGs3nlDNp+ FXNXDKVD/IwCDFHEDIO/Vzf7/cqbr2tDAEAIU5qDTyhsyr0x5PpLYjLJGqIPlAP3eH r0+VnwBgsDDx0paNHIzLtceZ7R3pckm87PxQbdQ4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Paolo Abeni , Geliang Tang , Mat Martineau , Jakub Kicinski , Sasha Levin Subject: [PATCH 5.16 140/200] mptcp: fix removing ids bitmap setting Date: Mon, 31 Jan 2022 11:56:43 +0100 Message-Id: <20220131105238.259851443@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220131105233.561926043@linuxfoundation.org> References: <20220131105233.561926043@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Geliang Tang [ Upstream commit a4c0214fbee97c46e3f41fee37931d66c0fc3cb1 ] In mptcp_pm_nl_rm_addr_or_subflow(), the bit of rm_list->ids[i] in the id_avail_bitmap should be set, not rm_list->ids[1]. This patch fixed it. Fixes: 86e39e04482b ("mptcp: keep track of local endpoint still available for each msk") Acked-by: Paolo Abeni Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- net/mptcp/pm_netlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/mptcp/pm_netlink.c b/net/mptcp/pm_netlink.c index 35abcce604b4d..14e6d6f745186 100644 --- a/net/mptcp/pm_netlink.c +++ b/net/mptcp/pm_netlink.c @@ -781,7 +781,7 @@ static void mptcp_pm_nl_rm_addr_or_subflow(struct mptcp_sock *msk, msk->pm.subflows--; __MPTCP_INC_STATS(sock_net(sk), rm_type); } - __set_bit(rm_list->ids[1], msk->pm.id_avail_bitmap); + __set_bit(rm_list->ids[i], msk->pm.id_avail_bitmap); if (!removed) continue; -- 2.34.1