From: Patrick McHardy <kaber@trash.net>
To: netfilter-devel <netfilter-devel@vger.kernel.org>
Subject: Re: [OOPS PATCH 1/1] netfilter: fix OOPS in flush_expectations()
Date: Fri, 11 Oct 2013 16:09:26 +0100 [thread overview]
Message-ID: <20131011150923.GA12533@macbook.localnet> (raw)
In-Reply-To: <20131011145347.GB3659@imap.eitzenberger.org>
On Fri, Oct 11, 2013 at 04:53:47PM +0200, Holger Eitzenberger wrote:
>
> > > Which is due to nf_conntrack_expect.lnode hlist entry not being reset
> > > to NULL after being removed from the list in hlist_del(), but instead to
> > > LIST_POISON1. And because of this hlist_for_each_entry_safe() does
> > > not terminate correctly.
> > >
> > > Therefore change nf_ct_unlink_expect_report() to use __hlist_del()
> > > instead.
> >
> > We should be holding the conntrack lock here and in flush_expectations(),
> > Not sure what I'm missing here, but if locking were used correctly, this
> > shouldn't be happening.
>
> My first impression was that it is something locking related, so I first
> looked at usage of nf_conntrack_lock. But I didn't find anything. So
> my understanding is that usage of nf_conntrack_lock is correct.
Well, it has to be, otherwise we couldn't be hitting the seeing
the element in flush_expectations() with LIST_POISON1.
> Still, I think that using hlist_del() together with those
> loop iterators expecting NULL-ness is a dangerous thing to do.
I disagree, its perfectly fine if done correctly. This is just papering
over the underlying issue, which is apparently missing in something
invoking nf_ct_unlink_expect_report().
next prev parent reply other threads:[~2013-10-11 15:09 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-11 14:02 [OOPS PATCH 0/1] netfilter/sip: fix OOPS in flush_expectations() Holger Eitzenberger
2013-10-11 14:02 ` [OOPS PATCH 1/1] netfilter: " Holger Eitzenberger
2013-10-11 14:35 ` Patrick McHardy
2013-10-11 14:53 ` Holger Eitzenberger
2013-10-11 15:09 ` Patrick McHardy [this message]
2013-10-11 20:37 ` [OOPS PATCH 0/1] netfilter/sip: " Pablo Neira Ayuso
2013-10-12 5:58 ` Holger Eitzenberger
2013-10-12 8:55 ` Patrick McHardy
2013-10-12 10:11 ` Holger Eitzenberger
2013-10-14 13:46 ` Holger Eitzenberger
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=20131011150923.GA12533@macbook.localnet \
--to=kaber@trash.net \
--cc=netfilter-devel@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).