diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2011-07-19 09:44:17 (GMT) |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2011-07-19 09:44:17 (GMT) |
commit | 5863702a3421b0d2a63a473cf96afeb9fe09070d (patch) | |
tree | d462b775b7702a4ae44ec50ec28a2217d5ab2338 /net/rose/rose_subr.c | |
parent | 84a797dd0b9f7130357b70577fcbda8e638c71a7 (diff) | |
download | linux-fsl-qoriq-5863702a3421b0d2a63a473cf96afeb9fe09070d.tar.xz |
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 <eric.dumazet@gmail.com>
CC: Florian Westphal <fw@strlen.de>
CC: Pablo Neira Ayuso <pablo@netfilter.org>
CC: Eric Leblond <eric@regit.org>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'net/rose/rose_subr.c')
0 files changed, 0 insertions, 0 deletions