Skip to content

Commit

Permalink
sctp: prepare for socket backlog behavior change
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Eric Dumazet authored and David S. Miller committed May 2, 2016
1 parent e61da9e commit 860fbbc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions net/sctp/inqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down

0 comments on commit 860fbbc

Please sign in to comment.