]> git.karo-electronics.de Git - linux-beck.git/commitdiff
sctp: prepare for socket backlog behavior change
authorEric Dumazet <edumazet@google.com>
Fri, 29 Apr 2016 21:16:51 +0000 (14:16 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 2 May 2016 21:02:26 +0000 (17:02 -0400)
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>
net/sctp/inqueue.c

index b335ffcef0b901b0e71bf0843057dbf5877da31b..9d87bba0ff1d34134093f34e4db3dc1b7e3dafd6 100644 (file)
@@ -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. */