From: David Miller <davem@davemloft.net>
To: ying.xue@windriver.com
Cc: jon.maloy@ericsson.com, erik.hugne@ericsson.com,
netdev@vger.kernel.org, tipc-discussion@lists.sourceforge.net
Subject: Re: [PATCH net] tipc: fix a potential deadlock
Date: Tue, 21 Oct 2014 15:30:13 -0400 (EDT) [thread overview]
Message-ID: <20141021.153013.950822619392700910.davem@davemloft.net> (raw)
In-Reply-To: <1413787465-14600-1-git-send-email-ying.xue@windriver.com>
From: Ying Xue <ying.xue@windriver.com>
Date: Mon, 20 Oct 2014 14:44:25 +0800
> Locking dependency detected below possible unsafe locking scenario:
>
> CPU0 CPU1
> T0: tipc_named_rcv() tipc_rcv()
> T1: [grab nametble write lock]* [grab node lock]*
> T2: tipc_update_nametbl() tipc_node_link_up()
> T3: tipc_nodesub_subscribe() tipc_nametbl_publish()
> T4: [grab node lock]* [grab nametble write lock]*
>
> The opposite order of holding nametbl write lock and node lock on
> above two different paths may result in a deadlock. If we move the
> the updating of the name table after link state named out of node
> lock, the reverse order of holding locks will be eliminated, and
> as a result, the deadlock risk.
>
> Signed-off-by: Ying Xue <ying.xue@windriver.com>
> Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
Applied.
prev parent reply other threads:[~2014-10-21 19:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-20 6:44 [PATCH net] tipc: fix a potential deadlock Ying Xue
2014-10-21 19:30 ` 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=20141021.153013.950822619392700910.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=erik.hugne@ericsson.com \
--cc=jon.maloy@ericsson.com \
--cc=netdev@vger.kernel.org \
--cc=tipc-discussion@lists.sourceforge.net \
--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;
as well as URLs for NNTP newsgroup(s).