diff options
author | Ying Xue <ying.xue@windriver.com> | 2014-01-17 02:50:03 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-01-17 04:10:34 +0100 |
commit | 78eb3a5379a52f291556483ea55b8a37e2ed4d5b (patch) | |
tree | f1c7192e97fa5756a7a76d31a1f098def4e26d6e /Documentation/bus-devices | |
parent | sctp: remove the unnecessary assignment (diff) | |
download | linux-78eb3a5379a52f291556483ea55b8a37e2ed4d5b.tar.xz linux-78eb3a5379a52f291556483ea55b8a37e2ed4d5b.zip |
tipc: standardize connect routine
Comparing the behaviour of how to wait for events in TIPC connect()
with other stacks, the TIPC implementation might be perceived as
different, and sometimes even incorrect. For instance, as both
sock->state and sk_sleep() are directly fed to
wait_event_interruptible_timeout() as its arguments, and socket lock
has to be released before we call wait_event_interruptible_timeout(),
the two variables associated with socket are exposed out of socket
lock protection, thereby probably getting stale values so that the
process of calling connect() cannot be woken up exactly even if
correct event arrives or it is woken up improperly even if the wake
condition is not satisfied in practice. Therefore, standardizing its
behaviour with sk_stream_wait_connect routine can avoid these risks.
Additionally the implementation of connect routine is simplified as a
whole, allowing it to return correct values in all different cases.
Signed-off-by: Ying Xue <ying.xue@windriver.com>
Reviewed-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'Documentation/bus-devices')
0 files changed, 0 insertions, 0 deletions