Skip to content

Commit 860fbbc

Browse files
edumazetdavem330
authored andcommitted
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 <edumazet@google.com> Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent e61da9e commit 860fbbc

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎net/sctp/inqueue.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,12 @@ void sctp_inq_push(struct sctp_inq *q, struct sctp_chunk *chunk)
8989
* Eventually, we should clean up inqueue to not rely
9090
* on the BH related data structures.
9191
*/
92+
local_bh_disable();
9293
list_add_tail(&chunk->list, &q->in_chunk_list);
9394
if (chunk->asoc)
9495
chunk->asoc->stats.ipackets++;
9596
q->immediate.func(&q->immediate);
97+
local_bh_enable();
9698
}
9799

98100
/* Peek at the next chunk on the inqeue. */

0 commit comments

Comments
 (0)