Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp2992119img; Mon, 25 Mar 2019 01:13:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqw67wRk4lBSy7/uj4tj1tiMyMCbGeH4DbuSIAnJ5iRik4OxnXwyURwphSTDR1jV3U27cVdD X-Received: by 2002:aa7:8615:: with SMTP id p21mr22290071pfn.98.1553501624230; Mon, 25 Mar 2019 01:13:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553501624; cv=none; d=google.com; s=arc-20160816; b=aEg0+hKiY7YdIkqPV/eMK1SO4Y7fb+bW34dDNW87l6nGUe3u7f7IVmO7v1QBAcsUPz SxNLkNpl1IBCVrcyDl0iWKy7dzFABxkjhdhY2eoHEtglrGt8iFzasumLUlvBFXG1UJe9 Jvf2TFJmE3V+h7yDsKXcES9onsz/UTEFxGzAwRr95v5VayHoyBdPVSJP2ZCw1c+CvSg5 Hcdp6urcUwIVSgeaC+tLWjEGIl+geOb8ZriE1Ge5IPFt9qU9v90CI6JX2mrPj91SdLwu fOFke/hqCOe4ZoudsFl49FMA+f3Brkvs1QmJCtYux7QwzDlYuDjKUi3/63SUU+Rhx52o ZK4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=QAJbcvfgSeUV24w/Uf3UezeQAhqTzbuup8FKjOrLoD4=; b=EKCM1PH788WSb6+sVBYLeIeWWuFwmkKk7e+nUm/erXffO0AKOcp3xiB1s2xbmbOOMS uDJCllMuPEeUrk/0FZAmqvIbqHr6e78zvkruKUq25hTfpcbPPtdeBgd8kg0yO38QrnT7 zUT8bCrM80t1qz9HmejAO67deT5mFUwFXHE0ThCk8Qz30pOYGRvKf2dA4DI//bhpzo5W 0LDA9Rd1he1CY+O6T6Kf2HZhXv/fP3sPpmMsCGdJCeCVpx8nRGjo7cth7CIcabtw6PaZ BZD9srYHzpChGz6tNiqTzU9btXfLASVWDdEFjjrxlYqQaZJB1H2tpKa/Km0T9Qkfrz9V YMDA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=virtuozzo.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u84si12930068pfa.134.2019.03.25.01.13.29; Mon, 25 Mar 2019 01:13:44 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=virtuozzo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729943AbfCYIMw (ORCPT + 99 others); Mon, 25 Mar 2019 04:12:52 -0400 Received: from relay.sw.ru ([185.231.240.75]:51752 "EHLO relay.sw.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729871AbfCYIMw (ORCPT ); Mon, 25 Mar 2019 04:12:52 -0400 Received: from [172.16.25.169] by relay.sw.ru with esmtp (Exim 4.91) (envelope-from ) id 1h8Kis-0002DJ-S4; Mon, 25 Mar 2019 11:12:47 +0300 Subject: Re: [PATCH net] netlink: fix a memory leak on error path To: cgxu519 , davem@davemloft.net Cc: keescook@chromium.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: <20190322105845.25046-1-cgxu519@gmx.com> <2acfd376-7b25-5eeb-2770-413b880bd4d9@virtuozzo.com> <786f1aec-fe47-f060-6f6e-4307ecaff82d@gmx.com> From: Kirill Tkhai Message-ID: <84e65ccd-d2ee-ed7c-e758-06a8a74312e3@virtuozzo.com> Date: Mon, 25 Mar 2019 11:12:45 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 MIME-Version: 1.0 In-Reply-To: <786f1aec-fe47-f060-6f6e-4307ecaff82d@gmx.com> Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 25.03.2019 04:19, cgxu519 wrote: > On 3/22/19 7:03 PM, Kirill Tkhai wrote: >> Hi, Chengguang, >> >> On 22.03.2019 13:58, Chengguang Xu wrote: >>> In genl_register_family(), when idr_alloc() fails, >>> we forget to free family->attrbuf. >>> >>> Note, some callers call genl_unregister_family() to clean up >>> on error path, it doesn't work because the family is inserted >>> to the global list in the nearly last step. >>> >>> Fixes: 2ae0f17df1c ("genetlink: use idr to track families"). >>> Signed-off-by: Chengguang Xu >> have you seen https://patchwork.ozlabs.org/patch/1059834/ ? > > Sorry, I didn't notice that because I'm mainly working on linus-tree. > Please just ignore this patch. Not a problem. Some information about network development process you may find in https://www.kernel.org/doc/Documentation/networking/netdev-FAQ.txt Kirill