From: Florian Westphal <fw@strlen.de>
To: Konstantin Khlebnikov <khlebnikov@openvz.org>
Cc: netdev@vger.kernel.org, Eric Dumazet <edumazet@google.com>,
"David S. Miller" <davem@davemloft.net>,
Florian Westphal <fw@strlen.de>,
linux-kernel@vger.kernel.org,
Jesper Dangaard Brouer <brouer@redhat.com>
Subject: Re: [PATCH] net: frag, fix race conditions in LRU list maintenance
Date: Sun, 5 May 2013 20:30:21 +0200 [thread overview]
Message-ID: <20130505183021.GB19796@breakpoint.cc> (raw)
In-Reply-To: <20130505145622.9351.86587.stgit@zurg>
Konstantin Khlebnikov <khlebnikov@openvz.org> wrote:
> This patch fixes race between inet_frag_lru_move() and inet_frag_lru_add()
> which was introduced in commit 3ef0eb0db4bf92c6d2510fe5c4dc51852746f206
> ("net: frag, move LRU list maintenance outside of rwlock")
>
> One cpu already added new fragment queue into hash but not into LRU.
> Other cpu found it in hash and tries to move it to the end of LRU.
> This leads to NULL pointer dereference inside of list_move_tail().
>
> Another possible race condition is between inet_frag_lru_move() and
> inet_frag_lru_del(): move can happens after deletion.
True, thanks for fixing this problem.
> This patch initializes LRU list head before adding fragment into hash and
> inet_frag_lru_move() doesn't touches it if it's empty.
Acked-by: Florian Westphal <fw@strlen.de>
next prev parent reply other threads:[~2013-05-05 18:30 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-05 14:56 [PATCH] net: frag, fix race conditions in LRU list maintenance Konstantin Khlebnikov
2013-05-05 17:36 ` David Miller
2013-05-05 18:30 ` Florian Westphal [this message]
2013-05-06 7:33 ` Jesper Dangaard Brouer
2013-05-06 15:08 ` David Miller
2013-05-07 5:22 ` Konstantin Khlebnikov
2013-05-07 9:13 ` David Miller
2013-05-08 15:32 ` Jesper Dangaard Brouer
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=20130505183021.GB19796@breakpoint.cc \
--to=fw@strlen.de \
--cc=brouer@redhat.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=khlebnikov@openvz.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.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).