]> git.baikalelectronics.ru Git - kernel.git/commit
tipc: fix list sorting bug in function tipc_group_update_member()
authorJon Maloy <jon.maloy@ericsson.com>
Mon, 18 Dec 2017 19:03:05 +0000 (20:03 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 19 Dec 2017 19:10:03 +0000 (14:10 -0500)
commit9b7f5d6ac620ee654d8fe8c00713156d146fe831
tree1bb0c5a3fe51577436b8462ed052025c17bad27d
parent7efd947a86a3077278b56b0429bedb29b2d042f7
tipc: fix list sorting bug in function tipc_group_update_member()

When, during a join operation, or during message transmission, a group
member needs to be added to the group's 'congested' list, we sort it
into the list in ascending order, according to its current advertised
window size. However, we miss the case when the member is already on
that list. This will have the result that the member, after the window
size has been decremented, might be at the wrong position in that list.
This again may have the effect that we during broadcast and multicast
transmissions miss the fact that a destination is not yet ready for
reception, and we end up sending anyway. From this point on, the
behavior during the remaining session is unpredictable, e.g., with
underflowing window sizes.

We now correct this bug by unconditionally removing the member from
the list before (re-)sorting it in.

Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tipc/group.c