Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp7149626ybi; Mon, 8 Jul 2019 15:38:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqz91vPSZ+sUuUXIsjaMtvU3bAaSk0vdhDSmj5xyQhhtubhVJ/GSlWtBNOGcVRqwqSunPdyq X-Received: by 2002:a17:90a:9b8a:: with SMTP id g10mr28026856pjp.66.1562625511710; Mon, 08 Jul 2019 15:38:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562625511; cv=none; d=google.com; s=arc-20160816; b=l3Nc8xg53zzsedblHirB6ThawiOwR/WNptbkQGGYDEnfpJFruE5sftyzuTm+NKykHt FlH1T9ORct2M5aYBjVEtb7lJV/7lRQc9dvBzHo+/Y1zXlxQ4l1lwc9KRgxpmaLJIhTrt BdznI9tBb8BIflnqx39nVPXU1qipQcJ+D37Cm3IjOssTK2gJO6IU0OrI/e6Xrum6wNbI I4mj/pSKJ6JaqC2vDndX93cZe5mmwTVMTxskyRq42vzJx2HQN8PhjBGlUT2t/Cf97iMd 79iVmClSgTPVZ62n9ci3Ze6Suq8YVue2JacVZgNAxS8DL1zbEhhqPuTIMdSAnDFJmTXw sKrw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=oiAkSyS6Su5JoBeZZF4r6/xZ3yEiSB3KfuhwaCdrsnU=; b=f9TXI4po9HMBdqQVlW60jUn5j450x2QstRYdSCUR6eyy+YGVqdCoVR4M27KHIuPjWc xgISFmsNQdbNLRCWiJqax57LKhXqISGnC0hMi4qng9zISKmFQE/j/BiIMkTG2s9YSHj4 KSPTAkRXJ8pWq0z9+oJUSy+dCvgVKAwcQuq09eYgTSn8nGAyt69lMx6RQYV/JXS9DqQF Af4+lB/vmK0my5gQGegAd7RmI3YijzL3jH4F7Qt0Xp7cukd67OsT16kIst/NguzE6NXW PfjeNl+82eok5JUwKA6vwl2FcYemsJUbhNeHFeGxD+kDHLZC2z8vgE7nA5y1ZaObYye6 m71g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Ias2ZMSV; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k3si642886pjt.103.2019.07.08.15.38.16; Mon, 08 Jul 2019 15:38:31 -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; dkim=pass header.i=@kernel.org header.s=default header.b=Ias2ZMSV; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389517AbfGHP3i (ORCPT + 99 others); Mon, 8 Jul 2019 11:29:38 -0400 Received: from mail.kernel.org ([198.145.29.99]:58452 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389504AbfGHP3e (ORCPT ); Mon, 8 Jul 2019 11:29:34 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 582ED21707; Mon, 8 Jul 2019 15:29:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1562599773; bh=OYcuxhqUVb8Tjwl2xKM6ssuEmlmfYxwlb2hiW3ErcAM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ias2ZMSVkSqTxXmLscD81+aEbS4vTXH2p5wGTAr7i8owCwxQnf79bnDi64C1IbCwH HquC8810b6n/SEB0LncTsHsjUyWbrYN7/M9tr6WHkqDq1Wa2cmluGJ1dRmDW6PUZ+P ey3eSMuUfZEoytVkybhwrPLa3DPpONQ2Dmq8soWI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, John Garry , Salil Mehta , "David S. Miller" , Sasha Levin Subject: [PATCH 4.19 73/90] net: hns: Fixes the missing put_device in positive leg for roce reset Date: Mon, 8 Jul 2019 17:13:40 +0200 Message-Id: <20190708150526.015161864@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190708150521.829733162@linuxfoundation.org> References: <20190708150521.829733162@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit 4d96e13ee9cd1f7f801e8c7f4b12f09d1da4a5d8 ] This patch fixes the missing device reference release-after-use in the positive leg of the roce reset API of the HNS DSAF. Fixes: c969c6e7ab8c ("net: hns: Fix object reference leaks in hns_dsaf_roce_reset()") Reported-by: John Garry Signed-off-by: Salil Mehta Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c index fdff5526d2e8..f5ff07cb2b72 100644 --- a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c +++ b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c @@ -3149,6 +3149,9 @@ int hns_dsaf_roce_reset(struct fwnode_handle *dsaf_fwnode, bool dereset) dsaf_set_bit(credit, DSAF_SBM_ROCEE_CFG_CRD_EN_B, 1); dsaf_write_dev(dsaf_dev, DSAF_SBM_ROCEE_CFG_REG_REG, credit); } + + put_device(&pdev->dev); + return 0; } EXPORT_SYMBOL(hns_dsaf_roce_reset); -- 2.20.1