From: Erik Hugne Date: Thu, 21 Mar 2019 08:11:59 +0000 (+0100) Subject: tipc: fix cancellation of topology subscriptions X-Git-Tag: v4.19.33~111 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=52a7505c91a19d3a2a1047225701a57728a83875;p=platform%2Fkernel%2Flinux-rpi.git tipc: fix cancellation of topology subscriptions [ 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 --- diff --git a/net/tipc/topsrv.c b/net/tipc/topsrv.c index d65eed8..2301b09 100644 --- a/net/tipc/topsrv.c +++ b/net/tipc/topsrv.c @@ -371,6 +371,7 @@ static int tipc_conn_rcv_sub(struct tipc_topsrv *srv, 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; }