From: Eric Dumazet Date: Fri, 29 Apr 2016 21:16:51 +0000 (-0700) Subject: sctp: prepare for socket backlog behavior change X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=860fbbc343bf;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git sctp: prepare for socket backlog behavior change sctp_inq_push() will soon be called without BH being blocked when generic socket code flushes the socket backlog. It is very possible SCTP can be converted to not rely on BH, but this needs to be done by SCTP experts. Signed-off-by: Eric Dumazet Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller --- diff --git a/net/sctp/inqueue.c b/net/sctp/inqueue.c index b335ffcef0b9..9d87bba0ff1d 100644 --- a/net/sctp/inqueue.c +++ b/net/sctp/inqueue.c @@ -89,10 +89,12 @@ void sctp_inq_push(struct sctp_inq *q, struct sctp_chunk *chunk) * Eventually, we should clean up inqueue to not rely * on the BH related data structures. */ + local_bh_disable(); list_add_tail(&chunk->list, &q->in_chunk_list); if (chunk->asoc) chunk->asoc->stats.ipackets++; q->immediate.func(&q->immediate); + local_bh_enable(); } /* Peek at the next chunk on the inqeue. */