Re: [PATCH net] net: Fix hlist corruptions in inet_evict_bucket()

From
David Miller <davem@davemloft.net>
Date
2018-03-07 18:29:56
Reply to
Kirill Tkhai, 2018-03-06
From: Kirill Tkhai <redacted>
Date: Tue, 06 Mar 2018 18:46:39 +0300
inet_evict_bucket() iterates global list, and
several tasks may call it in parallel. All of
them hash the same fq->list_evictor to different
lists, which leads to list corruption.

This patch makes fq be hashed to expired list
only if this has not been made yet by another
task. Since inet_frag_alloc() allocates fq
using kmem_cache_zalloc(), we may rely on
list_evictor is initially unhashed.

The problem seems to exist before async
pernet_operations, as there was possible to have
exit method to be executed in parallel with
inet_frags::frags_work, so I add two Fixes tags.
This also may go to stable.

Fixes: d1fe19444d82 "inet: frag: don't re-use chainlist for evictor"
Fixes: f84c6821aa54 "net: Convert pernet_subsys, registered from inet_init()"
Signed-off-by: Kirill Tkhai <redacted>
Applied and queued up for -stable, thank you.
Thread (2 messages) 2 messages, 2 authors, last reply 2018-03-07
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help