Message ID | 1536569876-27262-2-git-send-email-ray.huang@amd.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <dri-devel-bounces@lists.freedesktop.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2FA5C6CB for <patchwork-dri-devel@patchwork.kernel.org>; Mon, 10 Sep 2018 08:58:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1D51928D33 for <patchwork-dri-devel@patchwork.kernel.org>; Mon, 10 Sep 2018 08:58:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1125928D36; Mon, 10 Sep 2018 08:58:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E989A28D33 for <patchwork-dri-devel@patchwork.kernel.org>; Mon, 10 Sep 2018 08:58:40 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DD36C6E267; Mon, 10 Sep 2018 08:58:38 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from NAM04-SN1-obe.outbound.protection.outlook.com (mail-eopbgr700060.outbound.protection.outlook.com [40.107.70.60]) by gabe.freedesktop.org (Postfix) with ESMTPS id BCDA36E266; Mon, 10 Sep 2018 08:58:37 +0000 (UTC) Received: from BN6PR1201CA0014.namprd12.prod.outlook.com (2603:10b6:405:4c::24) by BLUPR12MB0419.namprd12.prod.outlook.com (2a01:111:e400:516c::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1122.16; Mon, 10 Sep 2018 08:58:35 +0000 Received: from CO1NAM03FT034.eop-NAM03.prod.protection.outlook.com (2a01:111:f400:7e48::200) by BN6PR1201CA0014.outlook.office365.com (2603:10b6:405:4c::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1122.15 via Frontend Transport; Mon, 10 Sep 2018 08:58:35 +0000 Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) Received: from SATLEXCHOV02.amd.com (165.204.84.17) by CO1NAM03FT034.mail.protection.outlook.com (10.152.80.177) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.20.1143.11 via Frontend Transport; Mon, 10 Sep 2018 08:58:34 +0000 Received: from hr-intel.amd.com (10.34.1.3) by SATLEXCHOV02.amd.com (10.181.40.72) with Microsoft SMTP Server id 14.3.389.1; Mon, 10 Sep 2018 03:58:33 -0500 From: Huang Rui <ray.huang@amd.com> To: <dri-devel@lists.freedesktop.org>, <amd-gfx@lists.freedesktop.org> Subject: [PATCH 2/2] drm/amdgpu: set tbo pointer as null after amdgpu bo is freed Date: Mon, 10 Sep 2018 16:57:56 +0800 Message-ID: <1536569876-27262-2-git-send-email-ray.huang@amd.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1536569876-27262-1-git-send-email-ray.huang@amd.com> References: <1536569876-27262-1-git-send-email-ray.huang@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:165.204.84.17; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(346002)(376002)(396003)(39860400002)(136003)(2980300002)(428003)(199004)(189003)(68736007)(104016004)(426003)(36756003)(86362001)(6666003)(5660300001)(106466001)(53936002)(53416004)(47776003)(186003)(50466002)(77096007)(336012)(478600001)(305945005)(450100002)(105586002)(26005)(316002)(50226002)(110136005)(72206003)(11346002)(54906003)(2906002)(7696005)(97736004)(126002)(476003)(81166006)(81156014)(8676002)(446003)(356003)(8936002)(2616005)(76176011)(2870700001)(486006)(4326008); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR12MB0419; H:SATLEXCHOV02.amd.com; FPR:; SPF:None; LANG:en; PTR:InfoDomainNonexistent; A:1; MX:1; X-Microsoft-Exchange-Diagnostics: 1; CO1NAM03FT034; 1:hQZDeE20oSweeluYtss8V3JF/2+UgZzFntYshp1m8Ggo21xjhCR9pFWmvuj99t1eP3k0o311YXMxGJxvOdPp2/2NVOM1Rl0Gtw/LNNjPTG2qgN6tDF2PVblXiAbSoXJB X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 6d2bb46e-2e41-479b-25a3-08d616fb975b X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(2017052603328)(7153060); SRVR:BLUPR12MB0419; X-Microsoft-Exchange-Diagnostics: 1; BLUPR12MB0419; 3:VIu3/HKFmF8H43PsF0NMOJNibXEvU9H+AN3dncW5qz9a1yS/LEkPCh/+WS7xH4+XwCvQgpHbmn1A/KQ2mpvif9hKmQvzSs8XEiaU8/e4lvwIank3zQknc14Anp6tSmWcoNWIIAISSc595VKVS+bu7RfZRQAEGS56u1kMZ5EktT2dcDLuQz/GLsHkcmItinCgwJW3e51FB+vxZtgouLzhFgI6M7RxPufYO+RPcblfyN3mt2h1XTVCDeMLEC/dCx4Dx9B9ntg0dOvFrDLqc3p0k+MiFc4hv9UlZkjmK4ny55OzFhNZrVyWFiTiNEoa/dfeQiVQecz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SgAYabRhyIiiSjVPi8Q3nPElruy5UiuAIjmH5LWmB1HetZwI4GciPR0UpjPGnLBWJN17jzSn1FNX3T5M0XvS+JSpikIwTLcqEEjDXlWv6JRrEwXPm94EmZFVdfKEMaVJj0iA67wqT X-Microsoft-Antispam-PRVS: <BLUPR12MB0419202CAEFBEFCA817C13BBEC050@BLUPR12MB0419.namprd12.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3002001)(93006095)(93003095)(3231311)(944501410)(52105095)(10201501046)(6055026)(149027)(150027)(6041310)(20161123562045)(20161123558120)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(201708071742011)(7699050); SRVR:BLUPR12MB0419; BCL:0; PCL:0; RULEID:; SRVR:BLUPR12MB0419; X-Microsoft-Exchange-Diagnostics: 1; BLUPR12MB0419; 4:YeoetnR24+UA6LYe8bjfAyYEBPlFDgn+nAM7xh01ZkWBR9iu67MxK70YIlCLrCLyWQN8WAHiyK0TZO/nR5eE97h3pjxhOg4yqtW9voYWWC0ZgFaC2fNbNHfTqnQHOCdIghPFogTD6DnRnY95Pm9+pzGUUO8lw/sqspktu1YMpx3fgDP1RCntWuA6dxvv4rIRDFHbKJTyPBvJV9Fu+6c3DZ5KsuX303Ful9A0K97tZZIbCaagpqgiKADm0d+3kV+nqPISEttBLUvQajAiHcfN4lg7MihhLaO1SeXDUzKlVAcg/i56AuqHeOQ1HiuC/Gt+ X-Forefront-PRVS: 07915F544A X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR12MB0419; 23:lz4GHBVvr0YNCaYgoRlTec/7TY12U94fEA89b2AoK?= jNco2s+jbKVK7p6/QdO5NpM/5Bj35gBjxYZaekjLpXMMexGLaXrRino/eezt5DRGHnllo0YOlVf9AXNZi9UN3cFb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BvuxGVi1L4r4HdH+k5mNfHHnGkhW13DQ7RkYUC8md02eEt7tqUM0f49wE4fbaJuS++nu5QILh+N9dvizrSxHKQLFys4cnQZbGavjRZMKY24Gp75re+ixaF06RRy9gBmO58Kt7fEiyto9o2HgyHwm9Hx+ZO7uuR0byVcdQ0U2fNJPFnYEasylGeBGXy0jp5I+gDokIG SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BLUPR12MB0419; 20:C4KOI3v3wij+2WwRUb7vyCF439HGZ5uVGTp0/jZn3PKatBmPEBfZjYVQHzGROm0zsp4TapmvalXg5O7DjyA7LsPE5ZsBWK97WOhVXttrZyXy5SwrmdQa4ueytWi+PJS97mf9SqXkJn+PwcN/xHnLAezd2lru+hClF7YDyjXiYjJoFcVlLO+8pRjiaVQU2ZcEa1Emus+wnHtI7jfErsNUL6FlEHOAqMnPnF5U73wYUQy1ZZGEZzViw+bxGO/jIBSO X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Sep 2018 08:58:34.9251 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6d2bb46e-2e41-479b-25a3-08d616fb975b X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXCHOV02.amd.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR12MB0419 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development <dri-devel.lists.freedesktop.org> List-Unsubscribe: <https://lists.freedesktop.org/mailman/options/dri-devel>, <mailto:dri-devel-request@lists.freedesktop.org?subject=unsubscribe> List-Archive: <https://lists.freedesktop.org/archives/dri-devel> List-Post: <mailto:dri-devel@lists.freedesktop.org> List-Help: <mailto:dri-devel-request@lists.freedesktop.org?subject=help> List-Subscribe: <https://lists.freedesktop.org/mailman/listinfo/dri-devel>, <mailto:dri-devel-request@lists.freedesktop.org?subject=subscribe> Cc: Tom StDenis <Tom.StDenis@amd.com>, Huang Rui <ray.huang@amd.com>, =?utf-8?q?Christian_K=C3=B6nig?= <christian.koenig@amd.com> Content-Type: multipart/mixed; boundary="===============0837238488==" Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" <dri-devel-bounces@lists.freedesktop.org> X-Virus-Scanned: ClamAV using ClamSMTP |
Series |
[1/2] drm/ttm: set ttm_buffer_object pointer as null after it's freed
|
expand
|
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c index de990bd..ae84c08 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c @@ -108,6 +108,7 @@ static void amdgpu_bo_destroy(struct ttm_buffer_object *tbo) } kfree(bo->metadata); kfree(bo); + tbo = NULL; } /**
The tbo pointer will still have value even the amdgpu bo is freed. It doesn't make sense that it still points a freed memory. It could be refered mistakenly, so set it as null. Signed-off-by: Huang Rui <ray.huang@amd.com> Cc: Christian König <christian.koenig@amd.com> Cc: Tom StDenis <Tom.StDenis@amd.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 1 + 1 file changed, 1 insertion(+)