Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp525042pxy; Wed, 21 Apr 2021 08:30:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJylbEE902ARpNnFDQFnCtkXFa0WvVy7z1M7l9zQioA/u3+j5Him7G6LezlsYnNMJHJWGlbh X-Received: by 2002:a05:6402:1d28:: with SMTP id dh8mr25578464edb.296.1619019000487; Wed, 21 Apr 2021 08:30:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619019000; cv=none; d=google.com; s=arc-20160816; b=lDid+9HujpThpqfi4H6VhWQo0i9EMt+Xq78q69DLpbJXwjz9fTupxicN/FgFLH4Rq4 tghGHQY2mjJyt4HIPzYY06+zWSxh+LawGvtVU+qBxkHQvBTuiXFSg/2tMS7xunV4++5J gy4kEioARB6oEHswXxyaKwKocxIsCBNYoNN3G8+ywOXGKswqinAfIgV89iTOezOsd/Oq WQZZvy77tFDXNAzTgdxplLMhddS+YYxpj+MvaM/wEiKcEmpppPilyZlWX+OZKpIKBrd5 jfOcFi9gmP9eQY3irMyssG3aDTh4/gmpvdwVjzSfTaLnr2Qm/FGhgBdRb9Ilhc1rCa0J PvKA== 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=cmUoCT5qXRubEEzz5w8bYhFI8JuVySCa2M6KYuNNsow=; b=KGyMxXEIVK/M0cK0CW6YJtd8Kaz2mUfIIpgRWEQMI5A5yx028hAsYgVkpQK3R3n2L+ dpuXT3mofKPMwKrShJVt5UlmMtE78spoPyWCHzAjbWHM+InUtbzuCTFZtyr+u40lwkz2 4xyaf/vT6PrdZOfRKFlqCpiZkNBJvp2ENmn4J5NKDqxFobKvyIc8T1prnaPC8JEdQR8t ZcXLaxMf8y+xOVpioHJZ5+4bOW8GUbjFV6yVkioKmo8UFb97rdRBWpJIwoFc/2+q2FuM O7xP6VBE2391wSv/+bT4m0QYI33isJB6lO82Rsgos1+m3E83ttP0IbZppANuoiIG/Qo5 UWRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="qlMy/B/K"; 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 f2si2228446edq.526.2021.04.21.08.29.36; Wed, 21 Apr 2021 08:30:00 -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="qlMy/B/K"; 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 S240664AbhDUNGR (ORCPT + 99 others); Wed, 21 Apr 2021 09:06:17 -0400 Received: from mail.kernel.org ([198.145.29.99]:45088 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240772AbhDUNFB (ORCPT ); Wed, 21 Apr 2021 09:05:01 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id AA1A761459; Wed, 21 Apr 2021 13:04:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1619010267; bh=3cAA7Azs7mPjOxr4kpObd82fiDWSh7aevdtiGJgx1QU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qlMy/B/KIuSpNlcct0Baxb1FlbDxyeLZhz2FTN3pzYMyLutxdgxEGxdcObxKXs5Rx sz1oAEf8QnKyZe04iEnWSfeva7HUy7hejc3G6NY0nsx4q+9Cw9hC+oJwY7DQwAu2S6 fvacf6nJ2lNMLex4yzhne70YTmeFTTPLtSF1OzP8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , Qiushi Wu , "Rafael J . Wysocki" Subject: [PATCH 038/190] Revert "cpuidle: Fix three reference count leaks" Date: Wed, 21 Apr 2021 14:58:33 +0200 Message-Id: <20210421130105.1226686-39-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 c343bf1ba5efcbf2266a1fe3baefec9cc82f867f. 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: Rafael J. Wysocki Signed-off-by: Greg Kroah-Hartman --- drivers/cpuidle/sysfs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/cpuidle/sysfs.c b/drivers/cpuidle/sysfs.c index 53ec9585ccd4..23a219cedbdb 100644 --- a/drivers/cpuidle/sysfs.c +++ b/drivers/cpuidle/sysfs.c @@ -487,7 +487,7 @@ static int cpuidle_add_state_sysfs(struct cpuidle_device *device) ret = kobject_init_and_add(&kobj->kobj, &ktype_state_cpuidle, &kdev->kobj, "state%d", i); if (ret) { - kobject_put(&kobj->kobj); + kfree(kobj); goto error_state; } cpuidle_add_s2idle_attr_group(kobj); @@ -618,7 +618,7 @@ static int cpuidle_add_driver_sysfs(struct cpuidle_device *dev) ret = kobject_init_and_add(&kdrv->kobj, &ktype_driver_cpuidle, &kdev->kobj, "driver"); if (ret) { - kobject_put(&kdrv->kobj); + kfree(kdrv); return ret; } @@ -712,7 +712,7 @@ int cpuidle_add_sysfs(struct cpuidle_device *dev) error = kobject_init_and_add(&kdev->kobj, &ktype_cpuidle, &cpu_dev->kobj, "cpuidle"); if (error) { - kobject_put(&kdev->kobj); + kfree(kdev); return error; } -- 2.31.1