[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20121211.125053.1135051054831742185.davem@davemloft.net>
Date: Tue, 11 Dec 2012 12:50:53 -0500 (EST)
From: David Miller <davem@...emloft.net>
To: eric.dumazet@...il.com
Cc: dmitry@...adcom.com, netdev@...r.kernel.org
Subject: Re: [PATCH] net: fix a race in gro_cell_poll()
From: Eric Dumazet <eric.dumazet@...il.com>
Date: Mon, 10 Dec 2012 14:32:03 -0800
> From: Eric Dumazet <edumazet@...gle.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 <dmitry@...adcom.com>
> Signed-off-by: Eric Dumazet <edumazet@...gle.com>
Applied and queued up for -stable, thanks.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists