]> git.baikalelectronics.ru Git - kernel.git/commit
sctp: Mark the tsn as received after all allocations finish
authorVlad Yasevich <vladislav.yasevich@hp.com>
Tue, 8 Jul 2008 09:28:39 +0000 (02:28 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 8 Jul 2008 09:28:39 +0000 (02:28 -0700)
commitb1de6963e69a980d9e03d6c0cb8d64fe7fbc37e1
tree5c4b889c057eac0951ed8bf248379ce2dcc33f90
parent5ea888ae2f4fd5f0d8f4012f695557e46960b83e
sctp: Mark the tsn as received after all allocations finish

If we don't have the buffer space or memory allocations fail,
the data chunk is dropped, but TSN is still reported as received.
This introduced a data loss that can't be recovered.  We should
only mark TSNs are received after memory allocations finish.
The one exception is the invalid stream identifier, but that's
due to user error and is reported back to the user.

This was noticed by Michael Tuexen.

Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sctp/sm_statefuns.c
net/sctp/ulpevent.c