]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/4.19.33/tipc-fix-cancellation-of-topology-subscriptions.patch
4.9-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 4.19.33 / tipc-fix-cancellation-of-topology-subscriptions.patch
CommitLineData
38568109
GKH
1From foo@baz Thu Mar 28 21:54:17 CET 2019
2From: Erik Hugne <erik.hugne@gmail.com>
3Date: Thu, 21 Mar 2019 09:11:59 +0100
4Subject: tipc: fix cancellation of topology subscriptions
5
6From: Erik Hugne <erik.hugne@gmail.com>
7
8[ Upstream commit 33872d79f5d1cbedaaab79669cc38f16097a9450 ]
9
10When cancelling a subscription, we have to clear the cancel bit in the
11request before iterating over any established subscriptions with memcmp.
12Otherwise no subscription will ever be found, and it will not be
13possible to explicitly unsubscribe individual subscriptions.
14
15Fixes: 8985ecc7c1e0 ("tipc: simplify endianness handling in topology subscriber")
16Signed-off-by: Erik Hugne <erik.hugne@gmail.com>
17Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
18Signed-off-by: David S. Miller <davem@davemloft.net>
19Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20---
21 net/tipc/topsrv.c | 1 +
22 1 file changed, 1 insertion(+)
23
24--- a/net/tipc/topsrv.c
25+++ b/net/tipc/topsrv.c
26@@ -371,6 +371,7 @@ static int tipc_conn_rcv_sub(struct tipc
27 struct tipc_subscription *sub;
28
29 if (tipc_sub_read(s, filter) & TIPC_SUB_CANCEL) {
30+ s->filter &= __constant_ntohl(~TIPC_SUB_CANCEL);
31 tipc_conn_delete_sub(con, s);
32 return 0;
33 }