From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9EF15C2BA83 for ; Wed, 12 Feb 2020 07:59:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6FCE12082F for ; Wed, 12 Feb 2020 07:59:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="RmzypZsV" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728428AbgBLH7Z (ORCPT ); Wed, 12 Feb 2020 02:59:25 -0500 Received: from mail-pf1-f194.google.com ([209.85.210.194]:43337 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728294AbgBLH7Z (ORCPT ); Wed, 12 Feb 2020 02:59:25 -0500 Received: by mail-pf1-f194.google.com with SMTP id s1so821252pfh.10 for ; Tue, 11 Feb 2020 23:59:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=A3ALousrxb41mAKhjOZbpboJDJp11dh0Ud3kWj2Z3Dk=; b=RmzypZsVZzGlLp9kLds3qg6JFi/4Lcr2E+goLhIJyh+FG0G3z3093yyvKdvOw9C3uo pb7lCWy3+mtaEJUWs30Jf8iIwX2FwjByCUQxuiejyo4K3YxdDx1Hz/eD6Hg//KjoJlV1 Dn62GKIVutz9zOvX6HzxnthhWncKiEOvin5zDSJsmhFTLxNfnlNsActrlGOnd+I2pB6n 8Cs6zl2MxPXl0D9/372r4Vnqa4wLM7cMKvikYXT4RQCF2o9+Iuk6hMesT4AKJb5jmqMX E1kxoaj6Ix4DbAowSX/1rgLPwSJx/5XbtLRAiBzmhuiIv5fBStrF7CcJmwew+hWSGomk oW5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=A3ALousrxb41mAKhjOZbpboJDJp11dh0Ud3kWj2Z3Dk=; b=Z2GacHNYpaQEkpAu0JCEQrOnklyp1rLuOqjbEp+yAxzr9OLG4rOJYw6yQTkpJrX1Tn Y71URbUt64gIvTAH9neHyFWKlZN7I85vRpNRg4ooqSG9vSfLiimy1gQx/w9GJUF5Hjxf cMwLq2GAOLpqnS4lFwEeumhURIuKtdBytl5yIkCdon09jJRbJRPscqsM1T7xovFeo2nB 3t72LaN320JaV0H4wbCFvArhoXztCRy3pNf5DBjogHYAXLurWuu1FB1LSr9UxcHtBZ5t l7Mk+u0msARzuKeiBf6NSw0TJ2JMdj+2JvsoDr4R+p5vEINVlklvky64ib3nzrAie22Q vuQA== X-Gm-Message-State: APjAAAXsjZ18Bn8axS09q2hUDVX47/6r21hLViLn8vCrn8SySqaiTXCs j21BhtM7J4uum2UB8TuDsp4= X-Google-Smtp-Source: APXvYqxRXpY07ecyqh1ZNA6yJXZ8pZhmeP/cJgozW6b17aqLnI3HGMeMONBLKXNcX8lum3AQfRzQcg== X-Received: by 2002:a63:dc4f:: with SMTP id f15mr10193816pgj.300.1581494364471; Tue, 11 Feb 2020 23:59:24 -0800 (PST) Received: from [192.168.86.235] (c-73-241-150-58.hsd1.ca.comcast.net. [73.241.150.58]) by smtp.gmail.com with ESMTPSA id a22sm7385768pfk.108.2020.02.11.23.59.23 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 11 Feb 2020 23:59:23 -0800 (PST) Subject: Re: Regression: net/ipv6/mld running system out of memory (not a leak) To: =?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?= , Network Development , Hangbin Liu , "David S. Miller" Cc: Felix Fietkau , John Crispin , Jo-Philipp Wich References: From: Eric Dumazet Message-ID: Date: Tue, 11 Feb 2020 23:59:22 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On 2/11/20 11:37 PM, Rafał Miłecki wrote: > Hi, I need some help with my devices running out of memory. I've > debugging skills but I don't know net subsystem. > > I run Linux based OpenWrt distribution on home wireless devices (ARM > routers and access points with brcmfmac wireless driver). I noticed > that using wireless monitor mode interface results in my devices (128 > MiB RAM) running out of memory in about 2 days. This is NOT a memory > leak as putting wireless down brings back all the memory. > > Interestingly this memory drain requires at least one of: > net.ipv6.conf.default.forwarding=1 > net.ipv6.conf.all.forwarding=1 > to be set. OpenWrt happens to use both by default. > > This regression was introduced by the commit 1666d49e1d41 ("mld: do > not remove mld souce list info when set link down") - first appeared > in 4.10 and then backported. This bug exists in 4.9.14 and 4.14.169. > Reverting that commit from 4.9.14 and 4.14.169 /fixes/ the problem. > > Can you look at possible cause/fix of this problem, please? Is there > anything I can test or is there more info I can provide? > > I'm not sure why this issue appears only when using monitor mode. > Using wireless __ap mode interface (with hostapd) won't expose this > issue. I guess it may be a matter of monitor interfaces not being > bridged? > This commit had few fixes, are you sure they were applied to your kernel ? 9c8bb163ae784be4f79ae504e78c862806087c54 igmp, mld: Fix memory leak in igmpv3/mld_del_delrec() 08d3ffcc0cfaba36f6b86fd568cc3bc773061fa6 multicast: do not restore deleted record source filter mode to new one a84d016479896b5526a2cc54784e6ffc41c9d6f6 mld: fix memory leak in mld_del_delrec()