summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorTuong Lien <tuong.t.lien@dektech.com.au>2020-01-08 03:18:15 +0100
committerDavid S. Miller <davem@davemloft.net>2020-01-09 00:57:07 +0100
commit49afb806cb650dd1f06f191994f3aa657d264009 (patch)
tree2e27c5f283e31f268f93feeb10641fdc2f26ced3 /fs
parentMerge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf (diff)
downloadlinux-49afb806cb650dd1f06f191994f3aa657d264009.tar.xz
linux-49afb806cb650dd1f06f191994f3aa657d264009.zip
tipc: fix link overflow issue at socket shutdown
When a socket is suddenly shutdown or released, it will reject all the unreceived messages in its receive queue. This applies to a connected socket too, whereas there is only one 'FIN' message required to be sent back to its peer in this case. In case there are many messages in the queue and/or some connections with such messages are shutdown at the same time, the link layer will easily get overflowed at the 'TIPC_SYSTEM_IMPORTANCE' backlog level because of the message rejections. As a result, the link will be taken down. Moreover, immediately when the link is re-established, the socket layer can continue to reject the messages and the same issue happens... The commit refactors the '__tipc_shutdown()' function to only send one 'FIN' in the situation mentioned above. For the connectionless case, it is unavoidable but usually there is no rejections for such socket messages because they are 'dest-droppable' by default. In addition, the new code makes the other socket states clear (e.g.'TIPC_LISTEN') and treats as a separate case to avoid misbehaving. Acked-by: Ying Xue <ying.xue@windriver.com> Acked-by: Jon Maloy <jon.maloy@ericsson.com> Signed-off-by: Tuong Lien <tuong.t.lien@dektech.com.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'fs')
0 files changed, 0 insertions, 0 deletions