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 X-Spam-Level: X-Spam-Status: No, score=-6.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 96722C10F05 for ; Mon, 1 Apr 2019 18:05:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5E23020880 for ; Mon, 1 Apr 2019 18:05:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1554141907; bh=aVDAKpKMtYU6XDXnAuO6ah9ym975p3qTie7u45JKtXA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=n0uthmSx11CzkC2kGB4au683YNn4AwFKfBkB7P/23IzzTs2rGmbe7myecXQu8tSmb BeMq5xmBhY/q9yqlkwnwZmF9QT1hnFR9pgf0Rpbt3SBGlGNBnrloOitphLhWBI+C60 5f9eD4pmcHRFuCWz4i1PIyQOQDqRaqojNSwBC7pY= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729528AbfDARNU (ORCPT ); Mon, 1 Apr 2019 13:13:20 -0400 Received: from mail.kernel.org ([198.145.29.99]:35778 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729241AbfDARNU (ORCPT ); Mon, 1 Apr 2019 13:13:20 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 25FEF21929; Mon, 1 Apr 2019 17:13:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1554138799; bh=aVDAKpKMtYU6XDXnAuO6ah9ym975p3qTie7u45JKtXA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FNOA4/Hcs/Yt/BKm8xi5tm4Jjv8wb3PIdvEv65XM6o5UylGlbePpFUm663JBfhzr6 9M5KFhoAxlyuPA4sfUqQ7+lpO3pdayAhWC1v7iL6+KG7knlnuiPS/n5PKAL2Mk/H0r JStDfhxm4LMOt96EfiT4NwgqmpjBSYm4oVFIkLow= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Erik Hugne , Jon Maloy , "David S. Miller" Subject: [PATCH 4.19 024/134] tipc: fix cancellation of topology subscriptions Date: Mon, 1 Apr 2019 19:01:00 +0200 Message-Id: <20190401170046.816167363@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190401170044.243719205@linuxfoundation.org> References: <20190401170044.243719205@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org 4.19-stable review patch. If anyone has any objections, please let me know. ------------------ From: Erik Hugne [ Upstream commit 33872d79f5d1cbedaaab79669cc38f16097a9450 ] When cancelling a subscription, we have to clear the cancel bit in the request before iterating over any established subscriptions with memcmp. Otherwise no subscription will ever be found, and it will not be possible to explicitly unsubscribe individual subscriptions. Fixes: 8985ecc7c1e0 ("tipc: simplify endianness handling in topology subscriber") Signed-off-by: Erik Hugne Signed-off-by: Jon Maloy Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- net/tipc/topsrv.c | 1 + 1 file changed, 1 insertion(+) --- a/net/tipc/topsrv.c +++ b/net/tipc/topsrv.c @@ -371,6 +371,7 @@ static int tipc_conn_rcv_sub(struct tipc struct tipc_subscription *sub; if (tipc_sub_read(s, filter) & TIPC_SUB_CANCEL) { + s->filter &= __constant_ntohl(~TIPC_SUB_CANCEL); tipc_conn_delete_sub(con, s); return 0; }