From: Steffen Klassert <steffen.klassert@secunet.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: "Jakub Kiciński" <moorray3@wp.pl>,
netdev@vger.kernel.org, "Fan Du" <fan.du@windriver.com>
Subject: Re: net-next: NULL pointer dereference on adding a net namespace and a system freeze
Date: Tue, 11 Mar 2014 14:20:30 +0100 [thread overview]
Message-ID: <20140311132030.GD32371@secunet.com> (raw)
In-Reply-To: <1394541626.21721.24.camel@edumazet-glaptop2.roam.corp.google.com>
On Tue, Mar 11, 2014 at 05:40:26AM -0700, Eric Dumazet wrote:
> On Tue, 2014-03-11 at 13:00 +0100, Steffen Klassert wrote:
>
> > I was unable to reproduce this here, but it looks like the flowcache
> > namespace changes are still not complete. We leak an active timer
> > and all the allocated resources when we exit a namespace.
> >
> > Could you please try the patch below?
> >
> > Also, please send your config if the patch does not fix your problem.
> >
> > Thanks!
> >
> > ---
> > include/net/flow.h | 1 +
> > net/core/flow.c | 18 ++++++++++++++++++
> > net/xfrm/xfrm_policy.c | 7 ++++++-
> > 3 files changed, 25 insertions(+), 1 deletion(-)
> >
> > diff --git a/include/net/flow.h b/include/net/flow.h
> > index bee3741..64fd248 100644
> > --- a/include/net/flow.h
> > +++ b/include/net/flow.h
> > @@ -219,6 +219,7 @@ struct flow_cache_object *flow_cache_lookup(struct net *net,
> > u8 dir, flow_resolve_t resolver,
> > void *ctx);
> > int flow_cache_init(struct net *net);
> > +void flow_cache_fini(struct net *net);
> >
> > void flow_cache_flush(struct net *net);
> > void flow_cache_flush_deferred(struct net *net);
> > diff --git a/net/core/flow.c b/net/core/flow.c
> > index 102f8ea..d31c3c4 100644
> > --- a/net/core/flow.c
> > +++ b/net/core/flow.c
> > @@ -484,3 +484,21 @@ err:
> > return -ENOMEM;
> > }
> > EXPORT_SYMBOL(flow_cache_init);
> > +
> > +void flow_cache_fini(struct net *net)
> > +{
> > + int i;
> > + struct flow_cache *fc = &net->xfrm.flow_cache_global;
> > +
> > + del_timer(&fc->rnd_timer);
>
>
> del_timer_sync() I guess is better.
>
Right.
I've just noticed that I also forgot to do a
unregister_hotcpu_notifier(&fc->hotcpu_notifier).
Will update the next version according to that.
next prev parent reply other threads:[~2014-03-11 13:20 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-10 0:44 net-next: NULL pointer dereference on adding a net namespace and a system freeze Jakub Kicinski
2014-03-10 4:02 ` Eric Dumazet
2014-03-10 4:09 ` Eric Dumazet
2014-03-10 6:51 ` Fan Du
2014-03-10 13:44 ` Eric Dumazet
2014-03-10 14:09 ` [PATCH net-next] flowcache: restore a single flow_cache kmem_cache Eric Dumazet
2014-03-11 1:45 ` David Miller
2014-03-10 12:19 ` net-next: NULL pointer dereference on adding a net namespace and a system freeze Jakub Kiciński
2014-03-10 14:04 ` Eric Dumazet
2014-03-11 0:46 ` Jakub Kiciński
2014-03-11 5:30 ` Steffen Klassert
2014-03-11 12:00 ` Steffen Klassert
2014-03-11 12:40 ` Eric Dumazet
2014-03-11 13:20 ` Steffen Klassert [this message]
2014-03-11 14:30 ` Jakub Kiciński
2014-03-12 8:38 ` Steffen Klassert
2014-03-12 8:43 ` [PATCH net-next] flowcache: Fix resource leaks on namespace exit Steffen Klassert
2014-03-12 11:43 ` Eric Dumazet
2014-03-12 19:31 ` David Miller
2014-03-11 12:42 ` net-next: NULL pointer dereference on adding a net namespace and a system freeze Jakub Kiciński
2014-03-12 10:02 ` Fan Du
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=20140311132030.GD32371@secunet.com \
--to=steffen.klassert@secunet.com \
--cc=eric.dumazet@gmail.com \
--cc=fan.du@windriver.com \
--cc=moorray3@wp.pl \
--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).