]> git.baikalelectronics.ru Git - kernel.git/commit
inet: frags: remove INET_FRAG_EVICTED and use list_evictor for the test
authorNikolay Aleksandrov <nikolay@cumulusnetworks.com>
Thu, 23 Jul 2015 10:05:40 +0000 (12:05 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 27 Jul 2015 04:00:15 +0000 (21:00 -0700)
commit8186776099a2272c7f13758f70e82c10a8ed1774
treecd22b0388ba421fdc26eac2fc94987a2677df062
parent7ee593563a3519c75ae6e44b847b6fce7ecc3104
inet: frags: remove INET_FRAG_EVICTED and use list_evictor for the test

We can simply remove the INET_FRAG_EVICTED flag to avoid all the flags
race conditions with the evictor and use a participation test for the
evictor list, when we're at that point (after inet_frag_kill) in the
timer there're 2 possible cases:

1. The evictor added the entry to its evictor list while the timer was
waiting for the chainlock
or
2. The timer unchained the entry and the evictor won't see it

In both cases we should be able to see list_evictor correctly due
to the sync on the chainlock.

Joint work with Florian Westphal.

Tested-by: Frank Schreuder <fschreuder@transip.nl>
Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/inet_frag.h
net/ipv4/inet_fragment.c
net/ipv4/ip_fragment.c
net/ipv6/reassembly.c