]> git.baikalelectronics.ru Git - kernel.git/commit
tipc: adjust locking policy of subscription
authorYing Xue <ying.xue@windriver.com>
Mon, 4 May 2015 02:36:47 +0000 (10:36 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 4 May 2015 19:04:01 +0000 (15:04 -0400)
commitcb2ba6ad30212a2fd305fe15f799fc260a7b0510
tree09672fe29b03cd8e43e8017089bb89beb6ef45a8
parent020c30b8682598122fa9895c343cf6436e8d40b9
tipc: adjust locking policy of subscription

Currently subscriber's lock protects not only subscriber's subscription
list but also all subscriptions linked into the list. However, as all
members of subscription are never changed after they are initialized,
it's unnecessary for subscription to be protected under subscriber's
lock. If the lock is used to only protect subscriber's subscription
list, the adjustment not only makes the locking policy simpler, but
also helps to avoid a deadlock which may happen once creating a
subscription is failed.

Signed-off-by: Ying Xue <ying.xue@windriver.com>
Reviewed-by: Jon Maloy <jon.maloy@ericson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tipc/subscr.c