]> www.infradead.org Git - users/jedix/linux-maple.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)
committerChuck Anderson <chuck.anderson@oracle.com>
Mon, 12 Dec 2016 01:40:47 +0000 (17:40 -0800)
commite2f17469725478218c9ac8c1399ca5b3489f5f66
tree7e468ce436677284ce4634a54cb7f991e857aff9
parentb17a9c9b55208966eeda5b9a2292743593689c53
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>
Orabug: 23633320
(cherry picked from commit caaecdd3d3f8ec0ea9906c54b1dd8ec8316d26b9)
Signed-off-by: Todd Vierling <todd.vierling@oracle.com>
include/net/inet_frag.h
net/ipv4/inet_fragment.c
net/ipv4/ip_fragment.c
net/ipv6/reassembly.c