[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20141021.153013.950822619392700910.davem@davemloft.net>
Date: Tue, 21 Oct 2014 15:30:13 -0400 (EDT)
From: David Miller <davem@...emloft.net>
To: ying.xue@...driver.com
Cc: jon.maloy@...csson.com, erik.hugne@...csson.com,
netdev@...r.kernel.org, tipc-discussion@...ts.sourceforge.net
Subject: Re: [PATCH net] tipc: fix a potential deadlock
From: Ying Xue <ying.xue@...driver.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@...driver.com>
> Signed-off-by: Jon Maloy <jon.maloy@...csson.com>
Applied.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists