Skip to content
Commit d1fe1944 authored by Florian Westphal's avatar Florian Westphal Committed by David S. Miller
Browse files

inet: frag: don't re-use chainlist for evictor



commit 65ba1f1e ("inet: frags: fix a race between inet_evict_bucket
and inet_frag_kill") describes the bug, but the fix doesn't work reliably.

Problem is that ->flags member can be set on other cpu without chainlock
being held by that task, i.e. the RMW-Cycle can clear INET_FRAG_EVICTED
bit after we put the element on the evictor private list.

We can crash when walking the 'private' evictor list since an element can
be deleted from list underneath the evictor.

Join work with Nikolay Alexandrov.

Fixes: b13d3cbf ("inet: frag: move eviction of queues to work queue")
Reported-by: default avatarJohan Schuijt <johan@transip.nl>
Tested-by: default avatarFrank Schreuder <fschreuder@transip.nl>
Signed-off-by: default avatarNikolay Alexandrov <nikolay@cumulusnetworks.com>
Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 81296fc6
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment