Thread (15 messages) flat view 15 messages, 4 authors, 2012-12-11

Re: [PATCH] net: fix a race in gro_cell_poll()

From: David Miller <davem@davemloft.net>
Date: 2012-12-11 17:50:55

From: Eric Dumazet <redacted>
Date: Mon, 10 Dec 2012 14:32:03 -0800
From: Eric Dumazet <edumazet@google.com>

Dmitry Kravkov reported packet drops for GRE packets since GRO support
was added.

There is a race in gro_cell_poll() because we call napi_complete()
without any synchronization with a concurrent gro_cells_receive()

Once bug was triggered, we queued packets but did not schedule NAPI
poll.

We can fix this issue using the spinlock protected the napi_skbs queue,
as we have to hold it to perform skb dequeue anyway.

As we open-code skb_dequeue(), we no longer need to mask IRQS, as both
producer and consumer run under BH context.

Bug added in commit c9e6bc644e (net: add gro_cells infrastructure)

Reported-by: Dmitry Kravkov <redacted>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Applied and queued up for -stable, thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help