From: Eric Dumazet Date: Tue, 19 Jul 2011 09:44:17 +0000 (+0200) Subject: netfilter: nfnetlink_queue: assert monotonic packet ids X-Git-Tag: v3.1-rc1~316^2~70^2~4 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5863702a3421b0d2a63a473cf96afeb9fe09070d;p=pandora-kernel.git netfilter: nfnetlink_queue: assert monotonic packet ids Packet identifier is currently setup in nfqnl_build_packet_message(), using one atomic_inc_return(). Problem is that since several cpus might concurrently call nfqnl_enqueue_packet() for the same queue, we can deliver packets to consumer in non monotonic way (packet N+1 being delivered after packet N) This patch moves the packet id setup from nfqnl_build_packet_message() to nfqnl_enqueue_packet() to guarantee correct delivery order. This also removes one atomic operation. Signed-off-by: Eric Dumazet CC: Florian Westphal CC: Pablo Neira Ayuso CC: Eric Leblond Signed-off-by: Patrick McHardy --- Reading git-diff-tree failed