Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp525914pxy; Wed, 21 Apr 2021 08:31:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJygbbgoekPli9nB9BRRZZUL9Rk+Thh7i0wcdml32ITEELPGANk72FsHUTFgHnxEFMdYWANa X-Received: by 2002:a50:fe81:: with SMTP id d1mr40191526edt.308.1619019065299; Wed, 21 Apr 2021 08:31:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619019065; cv=none; d=google.com; s=arc-20160816; b=MK/Ks4ZpG0uCt2dNI5P492dHAfQSHX9tFzuD/H3Lp8F0kgynyuy2cgANchB3lACq25 VkN/figBRDlBG+J/KLGZ4WVHi817h4QM2+DAZvQJgRVtKItEbLcrzRUzfHW+hnvBblhz NScbYcECeWjEAUKpIC1ouMGWv9zsLb2DfLM+6GzFMeImQTTY3JPFiwqM1LPRuG64JxRR LhP3954s2fiCfR3kcGW7DMR/2IcsEJ68YKp+T24LkjZDzCp6toq7TSAyBx35czmCQqlD 8TwbNpV4WJiFJHR48LMXyG8ZQ1tGuUS3cemGqhUg5zg+7IGB9eyffIv/RW6yCRk6byXn bk9Q== 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=iL4sXybpxGoCIkzqT7i9vZ5m0VJGdOu8Qs9/kXXfSAQ=; b=EZm1/eg8sgWAn1//pOnLBUGVdF/ogHo1zDaSfA2D8nngeG09K1lu/tkMD2JWrO1TlV 9cbne3TALbJ0nOCM/MU/oASb32KXgAZVxrumP6tlBOL+62UdqCURaKGHK0ntUJGlXKCs uE5z9GXQEJHamPsRxn8aGau/GYTyzULxnorIR6IIJoKaFT0xfrJf8yWoV+vnDmjwdcLE ie3hsfCoS5Y5/JZGs+yxoJRAm7zFMJ5w7GyQV/lAI8yAG7O9uMNBCj/p4+JBY/78cwnN soYiEfN9tc/bg7u1LduZPClRwu7cGRbg2R/SoRaKY+fQX6Kz82jIgZIe48khiJmxEjx1 jPrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=P9ZAJj9O; 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 k25si2055234eja.292.2021.04.21.08.30.41; Wed, 21 Apr 2021 08:31:05 -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=P9ZAJj9O; 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 S239646AbhDUNGj (ORCPT + 99 others); Wed, 21 Apr 2021 09:06:39 -0400 Received: from mail.kernel.org ([198.145.29.99]:45496 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239853AbhDUNFU (ORCPT ); Wed, 21 Apr 2021 09:05:20 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id B538861455; Wed, 21 Apr 2021 13:04:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1619010286; bh=fHIhHWhbZ0ZhEMCmgbmyntppO5e7+bgAG3Mo5QZudmY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=P9ZAJj9Ok1AnD6oyTDrXniGsEFAsdE0OKXejWL5p469GqRQ/+2mdGjv4/QQlTord3 XaRwbeiLAQ6pIE4R+CczsYXoIT88xRs+nKtCg7Mg87oTK0TRL3uOoeknwUq/K428d+ fgLDpsKp3ty6zKNRwLySF6KMzRgcgjDKew/qvD/w= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Wenwen Wang , Steven Rostedt Subject: [PATCH 081/190] Revert "tracing: Fix a memory leak by early error exit in trace_pid_write()" Date: Wed, 21 Apr 2021 14:59:16 +0200 Message-Id: <20210421130105.1226686-82-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 91862cc7867bba4ee5c8fcf0ca2f1d30427b6129. 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: http Cc: stable@vger.kernel.org Cc: Wenwen Wang Cc: Steven Rostedt (VMware) Signed-off-by: Greg Kroah-Hartman --- kernel/trace/trace.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 5c777627212f..faed4f44d224 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -691,10 +691,8 @@ int trace_pid_write(struct trace_pid_list *filtered_pids, * not modified. */ pid_list = kmalloc(sizeof(*pid_list), GFP_KERNEL); - if (!pid_list) { - trace_parser_put(&parser); + if (!pid_list) return -ENOMEM; - } pid_list->pid_max = READ_ONCE(pid_max); @@ -704,7 +702,6 @@ int trace_pid_write(struct trace_pid_list *filtered_pids, pid_list->pids = vzalloc((pid_list->pid_max + 7) >> 3); if (!pid_list->pids) { - trace_parser_put(&parser); kfree(pid_list); return -ENOMEM; } -- 2.31.1