Message ID | 20200203161921.742470591@linuxfoundation.org |
---|---|
State | New |
Headers | show
Return-Path: <SRS0=s+JW=3X=vger.kernel.org=stable-owner@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1A7AEC35247 for <stable@archiver.kernel.org>; Mon, 3 Feb 2020 16:46:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D826F2051A for <stable@archiver.kernel.org>; Mon, 3 Feb 2020 16:46:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1580748389; bh=/iqsiNq1ufmoQNtCN5R0k0FfUZr3NDO+99uNskwHkS8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=X6o7GNW36DkcZRRnAadhrwTP4qxDs8Fne8S9qDw1urelH4BC5HMqJZ2xpXW6yX2g+ sJ8neNZmqaYujhbPvy/fv/ut4JkZ9wVlGSkD3sqp4os/qZaQW6ilNzt0L1eVCPqnXF vmHTW5MGDuhnrL5gXEFSN/CObkbnR5LAT488IVz4= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729639AbgBCQ2m (ORCPT <rfc822;stable@archiver.kernel.org>); Mon, 3 Feb 2020 11:28:42 -0500 Received: from mail.kernel.org ([198.145.29.99]:40354 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727257AbgBCQ2l (ORCPT <rfc822;stable@vger.kernel.org>); Mon, 3 Feb 2020 11:28:41 -0500 Received: from localhost (unknown [104.132.45.99]) (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 37D2421744; Mon, 3 Feb 2020 16:28:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1580747320; bh=/iqsiNq1ufmoQNtCN5R0k0FfUZr3NDO+99uNskwHkS8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qwiBlk9Z4QcnEq3xNdYVkuLdRj7Iuk300wIb9bbe4TGqGWL1m6IV00mRc1kBtP8fj /qnpgkf/tz4yIwsr25fmih4aTRAvqe1sT9UQMZEgZTb+OurdKvQXi9cgSbWuO8lv8V E73062Iu/WcU6JffXoUBosMdtyuOl0dUT1yRVzS0= From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, stable@vger.kernel.org, Reinette Chatre <reinette.chatre@intel.com>, Xiaochen Shen <xiaochen.shen@intel.com>, Borislav Petkov <bp@suse.de>, Tony Luck <tony.luck@intel.com>, Thomas Gleixner <tglx@linutronix.de>, Sasha Levin <sashal@kernel.org> Subject: [PATCH 4.14 35/89] x86/resctrl: Fix use-after-free due to inaccurate refcount of rdtgroup Date: Mon, 3 Feb 2020 16:19:20 +0000 Message-Id: <20200203161921.742470591@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200203161916.847439465@linuxfoundation.org> References: <20200203161916.847439465@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: <stable.vger.kernel.org> X-Mailing-List: stable@vger.kernel.org |
Series |
None
|
expand
|
diff --git a/arch/x86/kernel/cpu/intel_rdt_rdtgroup.c b/arch/x86/kernel/cpu/intel_rdt_rdtgroup.c index 734996904dc3b..01574966d91fd 100644 --- a/arch/x86/kernel/cpu/intel_rdt_rdtgroup.c +++ b/arch/x86/kernel/cpu/intel_rdt_rdtgroup.c @@ -1800,11 +1800,6 @@ static int rdtgroup_rmdir_ctrl(struct kernfs_node *kn, struct rdtgroup *rdtgrp, closid_free(rdtgrp->closid); free_rmid(rdtgrp->mon.rmid); - /* - * Free all the child monitor group rmids. - */ - free_all_child_rdtgrp(rdtgrp); - list_del(&rdtgrp->rdtgroup_list); /* @@ -1814,6 +1809,11 @@ static int rdtgroup_rmdir_ctrl(struct kernfs_node *kn, struct rdtgroup *rdtgrp, kernfs_get(kn); kernfs_remove(rdtgrp->kn); + /* + * Free all the child monitor group rmids. + */ + free_all_child_rdtgrp(rdtgrp); + return 0; }