]> git.baikalelectronics.ru Git - kernel.git/commit
inet: frag: use seqlock for hash rebuild
authorFlorian Westphal <fw@strlen.de>
Thu, 24 Jul 2014 14:50:36 +0000 (16:50 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Jul 2014 05:34:36 +0000 (22:34 -0700)
commit59e32c04a74aeddbb6c76ef611fa2d71a09e7cfc
tree215b28da3dc0fbbac8dd853501306f65b165a499
parentf82d4b0dc17f41a4d1f541b8ffcda39dad9d0826
inet: frag: use seqlock for hash rebuild

rehash is rare operation, don't force readers to take
the read-side rwlock.

Instead, we only have to detect the (rare) case where
the secret was altered while we are trying to insert
a new inetfrag queue into the table.

If it was changed, drop the bucket lock and recompute
the hash to get the 'new' chain bucket that we have to
insert into.

Joint work with Nikolay Aleksandrov.

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Nikolay Aleksandrov <nikolay@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/inet_frag.h
net/ieee802154/reassembly.c
net/ipv4/inet_fragment.c
net/ipv4/ip_fragment.c
net/ipv6/netfilter/nf_conntrack_reasm.c
net/ipv6/reassembly.c