]> git.baikalelectronics.ru Git - kernel.git/commit
mptcp: fix subflow traversal at disconnect time
authorPaolo Abeni <pabeni@redhat.com>
Fri, 8 Jul 2022 23:36:09 +0000 (16:36 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 11 Jul 2022 10:31:38 +0000 (11:31 +0100)
commit7f4db0ec1554a8c6410b043dd975975ea80b603c
tree7213de53b91b9a42654da4d4988ed6d1676c3be2
parentfbaab53318156ae8941e7a5eb467b703be5f643c
mptcp: fix subflow traversal at disconnect time

At disconnect time the MPTCP protocol traverse the subflows
list closing each of them. In some circumstances - MPJ subflow,
passive MPTCP socket, the latter operation can remove the
subflow from the list, invalidating the current iterator.

Address the issue using the safe list traversing helper
variant.

Reported-by: van fantasy <g1042620637@gmail.com>
Fixes: 7cc40ad9c3de ("mptcp: full disconnect implementation")
Tested-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/mptcp/protocol.c