tipc: let group member stay in JOINED mode if unable to reclaim
commit4ea5dab541717fc55cad609360b100857af770b0
authorJon Maloy <jon.maloy@ericsson.com>
Mon, 8 Jan 2018 20:03:24 +0000 (8 21:03 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 9 Jan 2018 17:35:57 +0000 (9 12:35 -0500)
tree57ab48f7b7bb99a56a81f4a4644659a0da2a94c8
parent8d5dee21f6f01f4632c10b750709a1383eefc7aa
tipc: let group member stay in JOINED mode if unable to reclaim

We handle a corner case in the function tipc_group_update_rcv_win().
During extreme pessure it might happen that a message receiver has all
its active senders in RECLAIMING or REMITTED mode, meaning that there
is nobody to reclaim advertisements from if an additional sender tries
to go active.

Currently we just set the new sender to ACTIVE anyway, hence at least
theoretically opening up for a receiver queue overflow by exceeding the
MAX_ACTIVE limit. The correct solution to this is to instead add the
member to the pending queue, while letting the oldest member in that
queue revert to JOINED state.

In this commit we refactor the code for handling message arrival from
a JOINED member, both to make it more comprehensible and to cover the
case described above.

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