From patchwork Mon Sep 10 08:57:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Huang Rui X-Patchwork-Id: 10593731 Return-Path: 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 B34156CB for ; Mon, 10 Sep 2018 08:58:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9FBBF28974 for ; Mon, 10 Sep 2018 08:58:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 92CA428AE6; Mon, 10 Sep 2018 08:58:18 +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 67D1428974 for ; Mon, 10 Sep 2018 08:58:17 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C34B76E256; Mon, 10 Sep 2018 08:58:13 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from NAM05-CO1-obe.outbound.protection.outlook.com (mail-eopbgr720074.outbound.protection.outlook.com [40.107.72.74]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4FC606E020; Mon, 10 Sep 2018 08:58:12 +0000 (UTC) Received: from MWHPR12CA0030.namprd12.prod.outlook.com (2603:10b6:301:2::16) by BY1PR12MB0423.namprd12.prod.outlook.com (2a01:111:e400:51b2::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1122.17; Mon, 10 Sep 2018 08:58:10 +0000 Received: from CO1NAM03FT004.eop-NAM03.prod.protection.outlook.com (2a01:111:f400:7e48::201) by MWHPR12CA0030.outlook.office365.com (2603:10b6:301:2::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1122.16 via Frontend Transport; Mon, 10 Sep 2018 08:58:10 +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 CO1NAM03FT004.mail.protection.outlook.com (10.152.80.154) 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:09 +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:08 -0500 From: Huang Rui To: , Subject: [PATCH 1/2] drm/ttm: set ttm_buffer_object pointer as null after it's freed Date: Mon, 10 Sep 2018 16:57:55 +0800 Message-ID: <1536569876-27262-1-git-send-email-ray.huang@amd.com> X-Mailer: git-send-email 2.7.4 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)(39860400002)(396003)(376002)(136003)(2980300002)(428003)(189003)(199004)(97736004)(104016004)(450100002)(4326008)(106466001)(105586002)(53936002)(478600001)(72206003)(8676002)(47776003)(53416004)(305945005)(356003)(6666003)(2906002)(2870700001)(476003)(126002)(68736007)(7696005)(36756003)(50226002)(8936002)(81166006)(81156014)(486006)(5660300001)(50466002)(426003)(86362001)(110136005)(54906003)(336012)(2616005)(186003)(26005)(77096007)(316002); DIR:OUT; SFP:1101; SCL:1; SRVR:BY1PR12MB0423; H:SATLEXCHOV02.amd.com; FPR:; SPF:None; LANG:en; PTR:InfoDomainNonexistent; MX:1; A:1; X-Microsoft-Exchange-Diagnostics: 1; CO1NAM03FT004; 1:b/zPfVsjuvOCz6v7V2k3yK/KsqZQanaSEZEBW5nEsOE2WwYuU+MrSo0s9MOoZH33hdqEWwwvgAlER/C93hAjvVJ5hAUR4rk2HTix4ITE+T8DLVgojdLZEKo7clz9MKO+ X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a340c16b-3f03-478d-9f47-08d616fb8874 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(2017052603328)(7153060); SRVR:BY1PR12MB0423; X-Microsoft-Exchange-Diagnostics: 1; BY1PR12MB0423; 3:U65nQd4OrWz/t/Kz0lg4ILTttRiz1AoyiUlQzptjbJ772szLkzyxprLKARS4/s63JQKh9wNwEHvBH0WlL5QpWlU5aV1WhnZusJ5qiTReFFq48Cs/1ZsExdLBW7WvI+VMEOFpohN7VcUhgIm+6RV6elz9UvpVipIK3YKbEDW7FM2KMNrQz5I0918WNZa8BYySLBD40miKxPsmKB/p4fqeshsKwLJ3SH2HINYbb+rbWWFFQFmacFrHC5zrqclyuvTphtcWnfRVnreCZqdW33NsaZbKb6bEY3LfES/rpMagN1est9ssRq5/aW3SwkVT1rhfc55isiaNoSWn3zVCaTBB1A3IuzxQWuT00LdKVhtgT3Q=; 25:HcbHuOLVLhDXDEAsV8AkQEdzj5StglihPQwV15BwBwBtQEIiU0HndCuxX8wq0k7VvwDRu5Wm24YpINiGPz1z5dUlggGAFl5sAVSy3TTVdy8ZnRx68nqGf6bNxSv89BlAiXd4DGz17qd78X92+wQgR/f0z/blEgMvN/1OQIhQdBDIIMu2qH1jFv/eKdAVr1fzFxUR52Rfx6fx2EDFOuQF3PG3hyz0aBXhZD+fLxz5lExxBcuBxg/bc8tTMm2FrklMEi9A6phNCCIp7rfeTruYOYhn8TpONihTsQMDd9BxPrIZMylKRzXovZrM4c4vAs4iEJw7/ZrfRNAlYPJAR8632A== X-MS-TrafficTypeDiagnostic: BY1PR12MB0423: X-Microsoft-Exchange-Diagnostics: 1; BY1PR12MB0423; 31:WO7IgiTB7Adygbdt16+hGQaAvtdL1JYgBEyAr93qGuGleDw4CN8sOZwgqJn6iprRuwK8XOf4NbYOQhRT5hKT/ecyK9hGraqwoo8QVNAmCBLFXa++MVK/vj+6s9yJMgquGmMxS9OYKegtyup8M+kvP8vvZ0Hrkh8/ikFgZx6vX7h/HamM0h6cg/WMOoARygXJskffCOxz/xIUHjwyzD5rPgxtY/UiLfzQw+FtTzd49HE=; 20:QoscSo5qp0wK65WEiH3ZA0ayGTGW9zooJUf+tFwm9YSMNDkG7wP9/59wDy4GH+LU5G/JcaiGO93M9uXkd/RHNa3CLLlsuTPD2ZOtIJNVg1ithLRtGrDZHr+MCmIIBmAQYYXDCjp4RfRTnnEaBNzk+aU1G58JF4VNSVw1Jk2Jqwnq/eAnjWEecQNgKEABlv7LTK1t1DBi9AX57kwyDtFIe3Sdv9JloOm5IfBCnpUs3jQGhoYzg16SfN3nRr8fOkEwxJV2XYeUP44KzAVXWPuOnE3U0tiIp03h21Qv5JUMtgu84LZ10Zxmt9WHUGchFqKSFNfVzekD+TBErE7LBOrI05lIYPxEYCqSsxO6bsmiQQcvTs9En92ywEWBIkZ6HkH4MQX5OaxRHSwWYJSAg2lLIVopto08f7lT9Ap8JZE1DJ8x7SNw0lN2s1S1e1P+RNfnS+gusQtJst8Jyq4GE+u+l4/bFkrLr8DialQiel4D5MwdMwDK9RRczMk+nvBpfu7z X-Microsoft-Antispam-PRVS: 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)(93006095)(93003095)(3231311)(944501410)(52105095)(3002001)(10201501046)(6055026)(149027)(150027)(6041310)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123558120)(201708071742011)(7699050); SRVR:BY1PR12MB0423; BCL:0; PCL:0; RULEID:; SRVR:BY1PR12MB0423; X-Microsoft-Exchange-Diagnostics: 1; BY1PR12MB0423; 4:QyhlmsU+kukkbxwT0RJGKKKoT7W1+z5qz4ZtCpErV9mhdccPunmaju6ZlnNYzb7P5o+vlBEw7tR/cRCzsgPtgts5ceVFl/a9yCQoXXfN3FthO54ZxWRHLZnGS4wxyo9D+Quh7Kb7SswfoALJW2R74WJhZvfVTpKVNUNWtEwzLRrMxal4e5VJHogNjEEUsE8iUorlira+JXv+xF5iF0a8gZGzcdhCbMGZ5sv1nQf1zsmNj7EJSj5fDq2ubPvNQ3pNnv/ubJOoXqNR9o9DTcCchOXY/CcdOFOy1fPHgW46GJPQied5Oa0xdf0NCl0lvyEA X-Forefront-PRVS: 07915F544A X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY1PR12MB0423; 23:rJzplmYPRbeouBg9KvK/DmsKHLW0Xug1xWKuy9OO3?= FL27+XEUE0OujoWD2XLI2x/X066t6KTfICQCxrYRHWirTXJ2AvTBKkXbgne7IE2feB6T+1BIiys5Bxu/T5x809VA40sqDBJUsU88OOuSLhC/eDzal2NNGudXP92SVrveno+lz4FEOcPSF4+72EyUvBHD/J9+yjvdJ/5b7rpMmgvzzIDUj5ogRp/i36r4XnOZMADFvXzmxnt2UUVY2YtLCVxgS4mBSwN29zoP1vZ6DbVUNlv81xnW8mz7yjaOjnpAspH0n+jv+Bj0nA6mCgb2p4h620A88BlEIt65uE2ljKcg5wlDXuNQXa5WJmYAm7ZYnaklwnJjfQV9dB78d52pAquCl1UvaddH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tGgsLhoaf4DFiv9A7WVMNtwiw9vTyr9bgTgzorVqObOepUj4LSwryUAy91eLyEdD2hKdujVzr3DYrwCoqGwsoyEenqq2a9uPYc+AZL9s2tanmrXNJAsl6B3QRGhBdsz7OqKpFu/2kxIiXUs/hDVypmEDxg59puLSyMzJrvq2SOKu7KdNz/mNcu5dXf67E/X1y2cBSYeqXbbzOa4t0VTzRbMGd3Li/V X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Sep 2018 08:58:09.8012 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a340c16b-3f03-478d-9f47-08d616fb8874 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: BY1PR12MB0423 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tom StDenis , Huang Rui , =?utf-8?q?Christian_K=C3=B6nig?= Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP It avoids to be refered again after freed. Signed-off-by: Huang Rui Cc: Christian König Cc: Tom StDenis Signed-off-by: Huang Rui --- drivers/gpu/drm/ttm/ttm_bo.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index 138c989..d3ef5f8 100644 --- a/drivers/gpu/drm/ttm/ttm_bo.c +++ b/drivers/gpu/drm/ttm/ttm_bo.c @@ -54,6 +54,7 @@ static struct attribute ttm_bo_count = { static void ttm_bo_default_destroy(struct ttm_buffer_object *bo) { kfree(bo); + bo = NULL; } static inline int ttm_mem_type_from_place(const struct ttm_place *place, From patchwork Mon Sep 10 08:57:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Huang Rui X-Patchwork-Id: 10593735 Return-Path: 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 ; 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 ; 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 ; 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 To: , 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/dfeQiVQeczbrG6fA0WC/tMdaN2b8V1B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PElruy5UiuAIjmH5LWmB1HetZwI4GciPR0UpjPGnLBWJN17jzSn1FNX3T5M0XvS+JSpikIwTLcqEEjDXlWv6JRrEwXPm94EmZFVdfKEMaVJj0iA67wqT X-Microsoft-Antispam-PRVS: 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/eezt5DRGHnllo0YOlVf9AXNZi9UN3cFb3TdUrzSTZBJ2hCss78ZVgmxpfIwoAb9n/sBWdi+xmfHDYuUK554YPwOBOCutOUCjAAELQQIi2WeRHmQ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xHKQLFys4cnQZbGavjRZMKY24Gp75re+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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tom StDenis , Huang Rui , =?utf-8?q?Christian_K=C3=B6nig?= Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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 Cc: Christian König Cc: Tom StDenis --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 1 + 1 file changed, 1 insertion(+) 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; } /**