Netdev List
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: jon.maloy@ericsson.com
Cc: netdev@vger.kernel.org, gordan.mihaljevic@dektech.com.au,
	tung.q.nguyen@dektech.com.au, hoang.h.le@dektech.com.au,
	canh.d.luu@dektech.com.au, ying.xue@windriver.com,
	tipc-discussion@lists.sourceforge.net
Subject: Re: [net 1/1] tipc: eliminate message disordering during binding table update
Date: Mon, 22 Oct 2018 19:29:42 -0700 (PDT)	[thread overview]
Message-ID: <20181022.192942.1130906428214974308.davem@davemloft.net> (raw)
In-Reply-To: <1539971740-23060-1-git-send-email-jon.maloy@ericsson.com>

From: Jon Maloy <jon.maloy@ericsson.com>
Date: Fri, 19 Oct 2018 19:55:40 +0200

> We have seen the following race scenario:
> 1) named_distribute() builds a "bulk" message, containing a PUBLISH
>    item for a certain publication. This is based on the contents of
>    the binding tables's 'cluster_scope' list.
> 2) tipc_named_withdraw() removes the same publication from the list,
>    bulds a WITHDRAW message and distributes it to all cluster nodes.
> 3) tipc_named_node_up(), which was calling named_distribute(), sends
>    out the bulk message built under 1)
> 4) The WITHDRAW message arrives at the just detected node, finds
>    no corresponding publication, and is dropped.
> 5) The PUBLISH item arrives at the same node, is added to its binding
>    table, and remains there forever.
> 
> This arrival disordering was earlier taken care of by the backlog queue,
> originally added for a different purpose, which was removed in the
> commit referred to below, but we now need a different solution.
> In this commit, we replace the rcu lock protecting the 'cluster_scope'
> list with a regular RW lock which comprises even the sending of the
> bulk message. This both guarantees both the list integrity and the
> message sending order. We will later add a commit which cleans up
> this code further.
> 
> Note that this commit needs recently added commit d3092b2efca1 ("tipc:
> fix unsafe rcu locking when accessing publication list") to apply
> cleanly.
> 
> Fixes: 37922ea4a310 ("tipc: permit overlapping service ranges in name table")
> Reported-by: Tuong Lien Tong <tuong.t.lien@dektech.com.au>
> Acked-by: Ying Xue <ying.xue@windriver.com>
> Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>

Applied.

      reply	other threads:[~2018-10-23 10:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-19 17:55 [net 1/1] tipc: eliminate message disordering during binding table update Jon Maloy
2018-10-23  2:29 ` David Miller [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181022.192942.1130906428214974308.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=canh.d.luu@dektech.com.au \
    --cc=gordan.mihaljevic@dektech.com.au \
    --cc=hoang.h.le@dektech.com.au \
    --cc=jon.maloy@ericsson.com \
    --cc=netdev@vger.kernel.org \
    --cc=tipc-discussion@lists.sourceforge.net \
    --cc=tung.q.nguyen@dektech.com.au \
    --cc=ying.xue@windriver.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox