From: Vlad Yasevich Date: Fri, 9 Nov 2007 16:43:41 +0000 (-0500) Subject: SCTP: Always flush the queue when uncorcking. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7d54dc6876b83d6bb75b8f7e865b7b9051056d22;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git SCTP: Always flush the queue when uncorcking. When the code calls uncork, trigger a queue flush, even if the queue was not corked. Most callers that explicitely cork the queue will have additinal checks to see if they corked it. Callers who do not cork the queue expect packets to flow when they call uncork. The scneario that showcased this bug happend when we were not able to bundle DATA with outgoing COOKIE-ECHO. As a result the data just sat in the outqueue and did not get transmitted. The application expected a response, but nothing happened. Signed-off-by: Vlad Yasevich --- diff --git a/net/sctp/outqueue.c b/net/sctp/outqueue.c index 99a3db5d5fae..fa76f235169b 100644 --- a/net/sctp/outqueue.c +++ b/net/sctp/outqueue.c @@ -662,10 +662,9 @@ static int sctp_outq_flush_rtx(struct sctp_outq *q, struct sctp_packet *pkt, int sctp_outq_uncork(struct sctp_outq *q) { int error = 0; - if (q->cork) { + if (q->cork) q->cork = 0; - error = sctp_outq_flush(q, 0); - } + error = sctp_outq_flush(q, 0); return error; }