]> git.baikalelectronics.ru Git - kernel.git/commit
sctp: Do not try to search for the transport twice
authorVlad Yasevich <vyasevich@gmail.com>
Sat, 29 Aug 2015 01:23:39 +0000 (21:23 -0400)
committerDavid S. Miller <davem@davemloft.net>
Sat, 29 Aug 2015 05:25:43 +0000 (22:25 -0700)
commit552b3aea6a8a54fd654e202b5d27092ef3f62ecb
tree5fc03ff07997ea5883a9279ce5d2b77d9407328c
parent85784f2d4273d507e47cdf24e79f75d3d1b1b2e4
sctp: Do not try to search for the transport twice

When removing an non-primary transport during ASCONF
processing, we end up traversing the transport list
twice: once in sctp_cmd_del_non_primary, and once in
sctp_assoc_del_peer.  We can avoid the second
search and call sctp_assoc_rm_peer() instead.
Found by code inspection during code reviews.

Signed-off-by: Vladislav Yasevich <vyasevich@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sctp/sm_sideeffect.c