netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [net v2 1/1]  tipc: fix cancellation of topology subscriptions
@ 2019-03-21  8:11 Jon Maloy
  2019-03-21 16:10 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Jon Maloy @ 2019-03-21  8:11 UTC (permalink / raw)
  To: davem, netdev
  Cc: gordan.mihaljevic, tung.q.nguyen, hoang.h.le, jon.maloy,
	canh.d.luu, ying.xue, tipc-discussion

From: Erik Hugne <erik.hugne@gmail.com>

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 <erik.hugne@gmail.com>
Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>

---
v2: clear bit in a more sensible way.. (comment from davem)
---
 net/tipc/topsrv.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/tipc/topsrv.c b/net/tipc/topsrv.c
index 4a708a4..b45932d7 100644
--- a/net/tipc/topsrv.c
+++ b/net/tipc/topsrv.c
@@ -363,6 +363,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;
 	}
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [net v2 1/1] tipc: fix cancellation of topology subscriptions
  2019-03-21  8:11 [net v2 1/1] tipc: fix cancellation of topology subscriptions Jon Maloy
@ 2019-03-21 16:10 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2019-03-21 16:10 UTC (permalink / raw)
  To: jon.maloy
  Cc: netdev, gordan.mihaljevic, tung.q.nguyen, hoang.h.le, canh.d.luu,
	ying.xue, tipc-discussion

From: Jon Maloy <jon.maloy@ericsson.com>
Date: Thu, 21 Mar 2019 09:11:59 +0100

> From: Erik Hugne <erik.hugne@gmail.com>
> 
> 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 <erik.hugne@gmail.com>
> Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
> 
> ---
> v2: clear bit in a more sensible way.. (comment from davem)

Applied and queued up for -stable.

Thanks for following up.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-03-21 16:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-21  8:11 [net v2 1/1] tipc: fix cancellation of topology subscriptions Jon Maloy
2019-03-21 16:10 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).