[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20140428.144352.2034397869216392037.davem@davemloft.net>
Date: Mon, 28 Apr 2014 14:43:52 -0400 (EDT)
From: David Miller <davem@...emloft.net>
To: ying.xue@...driver.com
Cc: jon.maloy@...csson.com, Paul.Gortmaker@...driver.com,
erik.hugne@...csson.com, netdev@...r.kernel.org,
tipc-discussion@...ts.sourceforge.net
Subject: Re: [PATCH net-next] tipc: move the delivery of named messages out
of nametbl lock
From: Ying Xue <ying.xue@...driver.com>
Date: Mon, 28 Apr 2014 18:00:10 +0800
> Commit a89778d8baf19cd7e728d81121a294a06cedaad1 ("tipc: add support
> for link state subscriptions") introduced below possible deadlock
> scenario:
>
> CPU0 CPU1
> T0: tipc_publish() link_timeout()
> T1: tipc_nametbl_publish() [grab node lock]*
> T2: [grab nametbl write lock]* link_state_event()
> T3: named_cluster_distribute() link_activate()
> T4: [grab node lock]* tipc_node_link_up()
> T5: tipc_nametbl_publish()
> T6: [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 delivery of named messages via link out of name nametbl lock,
> the reverse order of holding locks will be eliminated, as a result,
> the deadlock will be killed as well.
>
> Signed-off-by: Ying Xue <ying.xue@...driver.com>
> Reviewed-by: Erik Hugne <erik.hugne@...csson.com>
Applied, thanks.
--
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