summaryrefslogtreecommitdiffstats
path: root/security/Kconfig
diff options
context:
space:
mode:
authorJon Paul Maloy <jon.maloy@ericsson.com>2015-02-03 08:59:17 -0500
committerDavid S. Miller <davem@davemloft.net>2015-02-04 16:09:31 -0800
commit2d72d49553d8de113d4eb1f69b2291f449a4c6bc (patch)
treec4b865c7d4a4e7b81438bba58042741865b403ae /security/Kconfig
parent940288b6a560710d4c63bc84d9570779dd7dec2b (diff)
downloadop-kernel-dev-2d72d49553d8de113d4eb1f69b2291f449a4c6bc.zip
op-kernel-dev-2d72d49553d8de113d4eb1f69b2291f449a4c6bc.tar.gz
tipc: add reference count to struct tipc_link
When a bearer is disabled, all pertaining links will be reset and deleted. However, if there is a second active link towards a killed link's destination, the delete has to be postponed until the failover is finished. During this interval, we currently put the link in zombie mode, i.e., we take it out of traffic, delete its timer, but leave it attached to the owner node structure until all missing packets have been received. When this is done, we detach the link from its node and delete it, assuming that the synchronous timer deletion that was initiated earlier in a different thread has finished. This is unsafe, as the failover may finish before del_timer_sync() has returned in the other thread. We fix this by adding an atomic reference counter of type kref in struct tipc_link. The counter keeps track of the references kept to the link by the owner node and the timer. We then do a conditional delete, based on the reference counter, both after the failover has been finished and when the timer expires, if applicable. Whoever comes last, will actually delete the link. This approach also implies that we can make the deletion of the timer asynchronous. Reviewed-by: Erik Hugne <erik.hugne@ericsson.com> Reviewed-by: Ying Xue <ying.xue@windriver.com> Signed-off-by: Jon Maloy <jon.maloy@ericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'security/Kconfig')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud