tipc: standardize sendmsg routine of connectionless socket
authorYing Xue <ying.xue@windriver.com>
Fri, 17 Jan 2014 01:50:05 +0000 (09:50 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 17 Jan 2014 03:10:34 +0000 (19:10 -0800)
commit3f40504f7ee419eda0068e55e0ee2622e1fce40b
tree5a73408e3b982fa823210965fcc4277da18663d5
parent6398e23cdb1d807132c1d3d007d6b1ec87b511af
tipc: standardize sendmsg routine of connectionless socket

Comparing the behaviour of how to wait for events in TIPC sendmsg()
with other stacks, the TIPC implementation might be perceived as
different, and sometimes even incorrect. For instance, sk_sleep()
and tport->congested variables associated with socket are exposed
without socket lock protection while wait_event_interruptible_timeout()
accesses them. So standardizing it with similar implementation
in other stacks can help us correct these errors which the process
of calling sendmsg() cannot be woken up event if an expected event
arrive at socket or improperly woken up although the wake condition
doesn't match.

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>
net/tipc/socket.c