From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751684AbbKCADN (ORCPT ); Mon, 2 Nov 2015 19:03:13 -0500 Received: from mail-pa0-f46.google.com ([209.85.220.46]:33949 "EHLO mail-pa0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751058AbbKCADK (ORCPT ); Mon, 2 Nov 2015 19:03:10 -0500 Message-ID: <1446508987.23275.35.camel@edumazet-glaptop2.roam.corp.google.com> Subject: Re: Resource leak in unshare From: Eric Dumazet To: "Eric W. Biederman" , Steffen Klassert Cc: Dmitry Vyukov , David Miller , nicolas.dichtel@6wind.com, Al Viro , Thomas Graf , xiyou.wangcong@gmail.com, netdev@vger.kernel.org, LKML , Alexey Kuznetsov , jmorris@namei.org, yoshfuji@linux-ipv6.org, Patrick McHardy , syzkaller , Kostya Serebryany , Alexander Potapenko , Eric Dumazet , Kees Cook , Julien Tinnes , Sasha Levin Date: Mon, 02 Nov 2015 16:03:07 -0800 In-Reply-To: <1446494052.23275.25.camel@edumazet-glaptop2.roam.corp.google.com> References: <87oafcrzsa.fsf@x220.int.ebiederm.org> <1446494052.23275.25.camel@edumazet-glaptop2.roam.corp.google.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4-0ubuntu2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2015-11-02 at 11:54 -0800, Eric Dumazet wrote: > On Mon, 2015-11-02 at 13:01 -0600, Eric W. Biederman wrote: > > Dmitry Vyukov writes: > > > > > Hello, > > > > > > I am hitting the following warnings on > > > bcee19f424a0d8c26ecf2607b73c690802658b29 (4.3): > > > > Do you have any trace of the earlier failures? > > > > This appears to be something caused by an earlier failure (possibly > > whatever fails to allocate memory). Having network devices present > > but being in the generic cleanup routines is wrong. > > > > If there is no additional information can you please rerun with the > > following change applied? That should at least report which function is > > failing, and give us a good clue where to start debugging this. > > At first, I would say sit is leaking percpu memory > > Load sit module, then : > > while : > do > ip netns add foo > ip netns del foo > done > > Will eat all memory eventually. > > ipip6_tunnel_init() and ipip6_fb_tunnel_init() are _both_ called for the > sit0 device, this looks very wrong. > > This memleak might have been added in commit ebe084aafb7e93adf210e80043c9f69adf56820d ("sit: Use ipip6_tunnel_init as the ndo_init function.") I'll send a patch asap, if nothing more urgent preempts me today...