sctp: refactor sctp_outq_teardown to insure proper re-initalization
authorNeil Horman <nhorman@tuxdriver.com>
Thu, 17 Jan 2013 11:15:08 +0000 (11:15 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 17 Jan 2013 23:39:56 +0000 (18:39 -0500)
commit2f94aabd9f6c925d77aecb3ff020f1cc12ed8f86
tree6f634d10b8bd5620acdab7b34d05728aed9cea05
parent01fe944f1024bd4e5c327ddbe8d657656b66af2f
sctp: refactor sctp_outq_teardown to insure proper re-initalization

Jamie Parsons reported a problem recently, in which the re-initalization of an
association (The duplicate init case), resulted in a loss of receive window
space.  He tracked down the root cause to sctp_outq_teardown, which discarded
all the data on an outq during a re-initalization of the corresponding
association, but never reset the outq->outstanding_data field to zero.  I wrote,
and he tested this fix, which does a proper full re-initalization of the outq,
fixing this problem, and hopefully future proofing us from simmilar issues down
the road.

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Reported-by: Jamie Parsons <Jamie.Parsons@metaswitch.com>
Tested-by: Jamie Parsons <Jamie.Parsons@metaswitch.com>
CC: Jamie Parsons <Jamie.Parsons@metaswitch.com>
CC: Vlad Yasevich <vyasevich@gmail.com>
CC: "David S. Miller" <davem@davemloft.net>
CC: netdev@vger.kernel.org
Acked-by: Vlad Yasevich <vyasevich@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sctp/outqueue.c