[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110321221357.GF22625@verge.net.au>
Date: Tue, 22 Mar 2011 07:13:58 +0900
From: Simon Horman <horms@...ge.net.au>
To: Eric Dumazet <eric.dumazet@...il.com>
Cc: Ingo Molnar <mingo@...e.hu>, David Miller <davem@...emloft.net>,
torvalds@...ux-foundation.org, akpm@...ux-foundation.org,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Thomas Gleixner <tglx@...utronix.de>,
Arnd Bergmann <arnd@...db.de>,
Pekka Enberg <penberg@...helsinki.fi>,
Julian Anastasov <ja@....bg>
Subject: Re: [slab poison overwritten] Re: [GIT] Networking
On Mon, Mar 21, 2011 at 09:15:40PM +0100, Eric Dumazet wrote:
> Le lundi 21 mars 2011 à 19:07 +0100, Eric Dumazet a écrit :
> > Le lundi 21 mars 2011 à 18:39 +0100, Ingo Molnar a écrit :
> > > here's the same but with kallsyms enabled.
> > >
> > > Thanks,
> > >
> > > Ingo
> > >
> > > [ 9.585627] initcall 0xffffffff81d5b806 returned 0 after 0 usecs
> > > [ 9.588960] calling 0xffffffff81d5b9da @ 1
> > > [ 9.592303] IPVS: Creating netns size=1272 id=0
> > > [ 9.595646] IPVS: __ip_vs_control_init(): alloc_percpu.
> > > [ 9.602298] IPVS: cannot register namespace.
> > > [ 9.605627] IPVS: can't setup control
> >
> > It seems IPVS is busted in case of memory allocation error in
> > __ip_vs_control_init()
> >
> > IPVS deinits its "struct netns_ipvs" space, but something (in IPVS) uses
> > it after free.
> >
> > __ip_vs_init() seems to be called before ip_vs_init() completes
> > correctly. We then keep in net->ipvs a pointer to some freed memory.
> >
> > Commit 14e405461e664b7 did some changes in this area
> >
> > Simon, any idea ?
> >
> >
>
> For the time being, we can avoid the false memory allocation error (and
> leak)
Sorry, that typo is my work.
> Thanks
>
> [PATCH] ipvs: fix a typo in __ip_vs_control_init()
>
> Reported-by: Ingo Molnar <mingo@...e.hu>
> Signed-off-by: Eric Dumazet <eric.dumazet@...il.com>
> Cc: Simon Horman <horms@...ge.net.au>
> Cc: Julian Anastasov <ja@....bg>
Acked-by: Simon Horman <horms@...ge.net.au>
> ---
> net/netfilter/ipvs/ip_vs_ctl.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/netfilter/ipvs/ip_vs_ctl.c b/net/netfilter/ipvs/ip_vs_ctl.c
> index b799cea..33733c8 100644
> --- a/net/netfilter/ipvs/ip_vs_ctl.c
> +++ b/net/netfilter/ipvs/ip_vs_ctl.c
> @@ -3605,7 +3605,7 @@ int __net_init __ip_vs_control_init(struct net *net)
>
> /* procfs stats */
> ipvs->tot_stats.cpustats = alloc_percpu(struct ip_vs_cpu_stats);
> - if (ipvs->tot_stats.cpustats) {
> + if (!ipvs->tot_stats.cpustats) {
> pr_err("%s(): alloc_percpu.\n", __func__);
> return -ENOMEM;
> }
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists