Message ID | 20210531130636.423923836@linuxfoundation.org |
---|---|
State | New |
Headers | show
Return-Path: <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=-19.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham 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 41342C47083 for <stable@archiver.kernel.org>; Mon, 31 May 2021 13:18:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 25C6B613D5 for <stable@archiver.kernel.org>; Mon, 31 May 2021 13:18:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232148AbhEaNUT (ORCPT <rfc822;stable@archiver.kernel.org>); Mon, 31 May 2021 09:20:19 -0400 Received: from mail.kernel.org ([198.145.29.99]:54382 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231946AbhEaNTX (ORCPT <rfc822;stable@vger.kernel.org>); Mon, 31 May 2021 09:19:23 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2A09761396; Mon, 31 May 2021 13:17:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1622467063; bh=Joz1eCpODLqPQKgdaHCknTXdIpMinnHu/FUByIrYEDg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LMn+zIv/5nfrV7OK3Rn3be0zdzvNTEPN5c83Hbo7ChT07++5nNKWOlhd+CFYXgksL c4EM/zXJ0nA3fBZ+fvYs8hHFwOzmBa7lBLrzceV1fdphh/CknAm4+pi2UDgrcYJnD3 HIfgyF+U6/i8CuTiziMEojjFqhUgnCmHj/EUtVrQ= From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, stable@vger.kernel.org, xinhui pan <xinhui.pan@amd.com>, =?utf-8?q?Christian_K=C3=B6nig?= <christian.koenig@amd.com>, Alex Deucher <alexander.deucher@amd.com>, Sasha Levin <sashal@kernel.org> Subject: [PATCH 4.4 43/54] drm/amdgpu: Fix a use-after-free Date: Mon, 31 May 2021 15:14:09 +0200 Message-Id: <20210531130636.423923836@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210531130635.070310929@linuxfoundation.org> References: <20210531130635.070310929@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: <stable.vger.kernel.org> X-Mailing-List: stable@vger.kernel.org |
Series |
None
|
expand
|
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c index 6beb3e76e1c9..014b87143837 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c @@ -737,6 +737,7 @@ static void amdgpu_ttm_tt_unpopulate(struct ttm_tt *ttm) if (gtt && gtt->userptr) { kfree(ttm->sg); + ttm->sg = NULL; ttm->page_flags &= ~TTM_PAGE_FLAG_SG; return; }