Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp632605ybm; Thu, 28 May 2020 11:13:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzyepdtTfhtMKARs/KmQUt5pDSM2UcBOsHVYmOt9e7pwgfTlBB6+UYWsbWztdspQ8iLKbL2 X-Received: by 2002:a05:6402:3106:: with SMTP id dc6mr4413835edb.19.1590689599537; Thu, 28 May 2020 11:13:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590689599; cv=none; d=google.com; s=arc-20160816; b=lxmyA8+ADJffehUSOnuyLeExU3lSW3730KUEtrfsD8keBk71zUFCdIhC3Q+huC1wNT 3nSN+Zazx+n0PaDTixpvgqS30D/VOpfNrLHcgLNvTbR/MK/9ZO8UoCI0hp7vHoidWNBC cgynECBWCjCdhB6ewENas+CEcH4Fq8xTQ3kO1tSLVZZcsDN+AgCal0UbAjmbSbqWLzUG /DFrcsP94+CXF4piOO6KtrVKcz/HyVjmCJN/kjl8fGsaWvGRF1aXiAzVK7/32tQAFiCQ hji/fs/IZ+RrkQIZ70lc5zilZPjdfv2c3eyJnCY2Ti8UlrGd/x8nApinKo0nlf4mpncX HlAw== 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:mime-version :references:in-reply-to:from:subject:cc:to:message-id:date; bh=hz0btKxAj3fl65D0e6pUDNMukzK0TD32q9CTnvwU4KI=; b=fexoXftlStuxh9KFGA6ROLm0c5jMF8UkFgFy2EnLiSC36PwXZMM4vCf5w6UFU7Nh/1 YoLavKrJr1ClPbwKcmWqOUdXhOzr3R5PNzijAh/y3Kd2nJBGxFSEepkEGo9CipX7gX26 TYIuBIRfNyw035GiAZjkUFjNxjHnKUzSwQokaDeq8jLu3meKCwxVODNYvlrZ6l97DS2Q g0LcBdQYE5VF8beUjERPmWI+JZKHUtqkuxlnoalhBkfLSnxtPp0iA2uST2F5gAjH2RHt ZU25CM37eg4SSw4ECW1cx141qjVSHncqiowAD5DoMC7NkHQXBePLaDNIK30VoMxCaxxE Ocgg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i17si3193924ejd.416.2020.05.28.11.12.55; Thu, 28 May 2020 11:13:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391452AbgE1SI7 (ORCPT + 99 others); Thu, 28 May 2020 14:08:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48014 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391412AbgE1SI4 (ORCPT ); Thu, 28 May 2020 14:08:56 -0400 Received: from shards.monkeyblade.net (shards.monkeyblade.net [IPv6:2620:137:e000::1:9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EEBF0C08C5C6; Thu, 28 May 2020 11:08:56 -0700 (PDT) Received: from localhost (unknown [IPv6:2601:601:9f00:477::3d5]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id 34CF71295A274; Thu, 28 May 2020 11:08:56 -0700 (PDT) Date: Thu, 28 May 2020 11:08:55 -0700 (PDT) Message-Id: <20200528.110855.1734440342981569253.davem@davemloft.net> To: wu000273@umn.edu Cc: kjlu@umn.edu, j.vosburgh@gmail.com, vfalico@gmail.com, andy@greyhouse.net, kuba@kernel.org, sfeldma@cumulusnetworks.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] bonding: Fix reference count leak in bond_sysfs_slave_add. From: David Miller In-Reply-To: <20200528031029.11078-1-wu000273@umn.edu> References: <20200528031029.11078-1-wu000273@umn.edu> X-Mailer: Mew version 6.8 on Emacs 26.3 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Thu, 28 May 2020 11:08:56 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: wu000273@umn.edu Date: Wed, 27 May 2020 22:10:29 -0500 > From: Qiushi Wu > > kobject_init_and_add() takes reference even when it fails. > If this function returns an error, kobject_put() must be called to > properly clean up the memory associated with the object. Previous > commit "b8eb718348b8" fixed a similar problem. > > Fixes: 07699f9a7c8d ("bonding: add sysfs /slave dir for bond slave devices.") > Signed-off-by: Qiushi Wu Applied and queued up for -stable, thanks.