Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp490853pxy; Wed, 21 Apr 2021 07:50:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJybRE7HGsONE2kWXJlDU80d6OAV1svMWIns9LIHbXjs+foKZKpJWdtUqbcxYnOB7RHSXDw/ X-Received: by 2002:a17:906:8144:: with SMTP id z4mr32973363ejw.404.1619016613594; Wed, 21 Apr 2021 07:50:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619016613; cv=none; d=google.com; s=arc-20160816; b=WOX6JyTB/gUwyH+GZDCIPuk72Ep24GAE1qz8ArimIk2sH1YiZX+TAU7Uuj39iA0fXG 9125Kaho30wbfsg5JyTLYaQMO5EvWmoZYf5NNzW91Hmk1sNFccspU/X99IGcxmQwtyqZ bNs5ml3a3GQ/OGe2713scmRmMOPqtUG2XNaVjlSqyOdf26GsMIF3UViaY8s4XLyrVuwM W/dMvJ8aG6QvRowPjWnf/3kQsTlrDDQrHrncIrAYH1P0PUELACvx9EMO7sN5NZERqu2F bcFuFjShcRPyuT4j4i4yu7PxcM/qHnCzOCkVp88VyqfdGwqI5nMHDa1OMU5BRftiT4iH Wl+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=0WYyCm7ZvFO0kq4dxcXx9ANLNGuMFuxrLxaLthgj6hw=; b=bgXgDs9luivSJxNeA72uknkJOdD4D77YGkfzl+ECx05GzAc0R1BWOkQvwlyjg9gofU h95QfWrTpfVczSRKLoSaYsm2r1AT4GQQOapwHEQ0ifPhzKLBCJZxR2aQiPZvPDrqum9E pMQIcDBNXD6Lu6dpfdw0bEPqh6eFoa7QzC0pj9AITTQS8Vo9OrTIhXaqqGOLr84Jp8vi +t9vF46VD1YU1y0SLW7th0h9JblpzF2ZrsoUWuaaM6383V7l1RvHMZQ43CNoXqe3nEGt eMcRpgfSMtrUvIxOxqUOTmCbFmy1G/O86e95fCVD9PBZCltkPvlpcRsmAHok3Y6Cg+Ht ETQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=GFYLM+kU; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h17si2103148ejx.114.2021.04.21.07.49.50; Wed, 21 Apr 2021 07:50:13 -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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=GFYLM+kU; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240261AbhDUNC5 (ORCPT + 99 others); Wed, 21 Apr 2021 09:02:57 -0400 Received: from mail.kernel.org ([198.145.29.99]:42190 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240200AbhDUNCs (ORCPT ); Wed, 21 Apr 2021 09:02:48 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2270A61453; Wed, 21 Apr 2021 13:02:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1619010134; bh=ezuOcTByzCIrFyUFNPvg+Ngf/KtYgFuVQpxSaSVaa0U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GFYLM+kUN+Ys+Yz+foCAejtqTUymtj92NBhOax3m0ABYoHHm7A1/huCoaqZe4Za2L RLLNJpIf4t7Q1eUeuzL/avx3N75pVJb0zzPpH0o58ahdxKTy/SMivUVIJ47fNvlqJi n8TzDPGDZTOLVlhJ99H+W6A0P+EttdR5af2q9qAs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , Qiushi Wu , Felix Kuehling , Alex Deucher Subject: [PATCH 024/190] Revert "drm/amdkfd: Fix reference count leaks." Date: Wed, 21 Apr 2021 14:58:19 +0200 Message-Id: <20210421130105.1226686-25-gregkh@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210421130105.1226686-1-gregkh@linuxfoundation.org> References: <20210421130105.1226686-1-gregkh@linuxfoundation.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This reverts commit 20eca0123a35305e38b344d571cf32768854168c. Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota). Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase. Cc: Qiushi Wu Cc: Felix Kuehling Cc: Felix Kuehling Cc: Alex Deucher Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_topology.c b/drivers/gpu/drm/amd/amdkfd/kfd_topology.c index 0be72789ccbc..d3c3fa25c2cc 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_topology.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_topology.c @@ -637,10 +637,8 @@ static int kfd_build_sysfs_node_entry(struct kfd_topology_device *dev, ret = kobject_init_and_add(dev->kobj_node, &node_type, sys_props.kobj_nodes, "%d", id); - if (ret < 0) { - kobject_put(dev->kobj_node); + if (ret < 0) return ret; - } dev->kobj_mem = kobject_create_and_add("mem_banks", dev->kobj_node); if (!dev->kobj_mem) @@ -687,10 +685,8 @@ static int kfd_build_sysfs_node_entry(struct kfd_topology_device *dev, return -ENOMEM; ret = kobject_init_and_add(mem->kobj, &mem_type, dev->kobj_mem, "%d", i); - if (ret < 0) { - kobject_put(mem->kobj); + if (ret < 0) return ret; - } mem->attr.name = "properties"; mem->attr.mode = KFD_SYSFS_FILE_MODE; @@ -708,10 +704,8 @@ static int kfd_build_sysfs_node_entry(struct kfd_topology_device *dev, return -ENOMEM; ret = kobject_init_and_add(cache->kobj, &cache_type, dev->kobj_cache, "%d", i); - if (ret < 0) { - kobject_put(cache->kobj); + if (ret < 0) return ret; - } cache->attr.name = "properties"; cache->attr.mode = KFD_SYSFS_FILE_MODE; @@ -729,10 +723,8 @@ static int kfd_build_sysfs_node_entry(struct kfd_topology_device *dev, return -ENOMEM; ret = kobject_init_and_add(iolink->kobj, &iolink_type, dev->kobj_iolink, "%d", i); - if (ret < 0) { - kobject_put(iolink->kobj); + if (ret < 0) return ret; - } iolink->attr.name = "properties"; iolink->attr.mode = KFD_SYSFS_FILE_MODE; @@ -811,10 +803,8 @@ static int kfd_topology_update_sysfs(void) ret = kobject_init_and_add(sys_props.kobj_topology, &sysprops_type, &kfd_device->kobj, "topology"); - if (ret < 0) { - kobject_put(sys_props.kobj_topology); + if (ret < 0) return ret; - } sys_props.kobj_nodes = kobject_create_and_add("nodes", sys_props.kobj_topology); -- 2.31.1