From: David Miller <davem@davemloft.net>
To: ktkhai@virtuozzo.com
Cc: fw@strlen.de, yoshfuji@linux-ipv6.org, netdev@vger.kernel.org
Subject: Re: [PATCH net] net: Fix hlist corruptions in inet_evict_bucket()
Date: Wed, 07 Mar 2018 13:29:54 -0500 (EST) [thread overview]
Message-ID: <20180307.132954.1909588060680439166.davem@davemloft.net> (raw)
In-Reply-To: <152035113120.7345.6783907370059817929.stgit@localhost.localdomain>
From: Kirill Tkhai <ktkhai@virtuozzo.com>
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 <ktkhai@virtuozzo.com>
Applied and queued up for -stable, thank you.
prev parent reply other threads:[~2018-03-07 18:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-06 15:46 [PATCH net] net: Fix hlist corruptions in inet_evict_bucket() Kirill Tkhai
2018-03-07 18:29 ` David Miller [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180307.132954.1909588060680439166.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=fw@strlen.de \
--cc=ktkhai@virtuozzo.com \
--cc=netdev@vger.kernel.org \
--cc=yoshfuji@linux-ipv6.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).