Message ID | 20220809095623.3569-1-Arunpravin.PaneerSelvam@amd.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <intel-gfx-bounces@lists.freedesktop.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8FC6CC25B07 for <intel-gfx@archiver.kernel.org>; Tue, 9 Aug 2022 09:56:58 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8A29611A6C3; Tue, 9 Aug 2022 09:56:56 +0000 (UTC) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2046.outbound.protection.outlook.com [40.107.223.46]) by gabe.freedesktop.org (Postfix) with ESMTPS id A658491FBC; Tue, 9 Aug 2022 09:56:45 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aA6SjZu1XyfEnex9cEFsylH6aG4487OyHMIt1dAhr0uN8aeKYAOtPO2GG6ZZkakNx2tpfLm8exNmcpu1bmybYn8/3lAVmol838xnQ/IiFa4X5k5B2LQUfO/W9JGUEOL59fRocZP7iR75Z9I6N8s2Zou3oUALG6naakvvxoUPEXesk6OGD0fEq9+iwfMKjxajk53xAHse1dSG+FWmpUtyvsuryCH5wxZZj+4MXunnH73tz/miUCqU0Tvjumr3gDb5QbR1rwLR+5HXFkFkEU3RCw3KvYs585NJAIjjbMrn+alrD8KLB96AQvjH/qnv0u23SCfvKciPqJm2GJpA7wvywg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=c3/A4KEOXfVSek8ADEi9m5U6F/50lsXxwu2CpX9/SN0=; b=CKvCxa/l6lyYoW9hQQMKNL0w0UTOpObie3NcF6Wsv/YM09kEzOCTmONEkyf/AEkOHIptBgQBOaZaWRGv4PDsj6dmnvEEC//QUg/5elakmRhrTvoYjfgDV342hFi5vzBPdpEs3eh941Lng4p9kh6JK7RYKXeSt8+N9HgCK7qA/7gyGHG85oSnOoXGh3F05gsQCVSxW+9NdYv0VXm4oCo81kmJHDKdyZF/lruu/lM8lFxvS5970UAyAFgAasxhZjMFnEBZNh4VJkuFeT+86Bv9hnNUNwAC7haS/00cwd+QrWq63nC0GDGgbbD+nWNIE2cLsUsjqiswaVaDSmYLVtoKQA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.freedesktop.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=c3/A4KEOXfVSek8ADEi9m5U6F/50lsXxwu2CpX9/SN0=; b=MLW3hK5VVj3j5IgwTt1JH0fnWlN4/Uxweew/iuapUTKMUh8K+rtht6kq6DGttzESl+ZczYS+KzQEopWUJGEblDm2vczt2XEkmV0J2tN2A6ysXKk3L1gINsHkYIntOHhz/q3aDOkoMyz6HP01rZJe0VCZIWxcW3ueFhJnNpn2PmQ= Received: from MW4PR04CA0193.namprd04.prod.outlook.com (2603:10b6:303:86::18) by CH2PR12MB3783.namprd12.prod.outlook.com (2603:10b6:610:2f::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5504.17; Tue, 9 Aug 2022 09:56:43 +0000 Received: from CO1NAM11FT068.eop-nam11.prod.protection.outlook.com (2603:10b6:303:86:cafe::76) by MW4PR04CA0193.outlook.office365.com (2603:10b6:303:86::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5504.16 via Frontend Transport; Tue, 9 Aug 2022 09:56:42 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by CO1NAM11FT068.mail.protection.outlook.com (10.13.175.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5504.14 via Frontend Transport; Tue, 9 Aug 2022 09:56:42 +0000 Received: from amd-X570-AORUS-ELITE.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Tue, 9 Aug 2022 04:56:38 -0500 From: Arunpravin Paneer Selvam <Arunpravin.PaneerSelvam@amd.com> To: <dri-devel@lists.freedesktop.org>, <amd-gfx@lists.freedesktop.org>, <intel-gfx@lists.freedesktop.org> Date: Tue, 9 Aug 2022 02:56:23 -0700 Message-ID: <20220809095623.3569-1-Arunpravin.PaneerSelvam@amd.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 87f2479b-80f4-44da-d6c9-08da79ed764c X-MS-TrafficTypeDiagnostic: CH2PR12MB3783:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: v8RFKtPA2jIIIR6dOLYrrwsOhhAmpZ+/n+BqYpNao8AWZsEicWYPcfcmiKLPhQOjZVdzExtiA+3d80kskbvyM1rhjRVaseMzQdgwloFo+0BRe5032TvlSzS3PF1M8je6xpKPOc4RiTyn0mL2jYdjXBDQEOuRfx3EW0SbzAYGELF/y9kfA9iAvEB0PRqfANp1Tx979i+rRoRr4dMLmzOyK0gRMMglszAnNbLPulOdj+CX20R8QCYyGYRdG/2p1kEzCaJ1oKk32gpg6bDZ5SLL6+PQiFPLL4mCpm0LB/KszV4pdprk2iCtnTBnIjHumFZ5b6tdL/ZjryYiiHrZw4Y4ff8tV2n3ZQOON+X5/tWGOWhxjI4/mWmGFDJkJWC7T2N9xiOxXr1C1D0UKVytHJQj9UoXFYYHmVgvi+BJeb/lSzC3F7Of3oUvgKmD/sYqP7O4QkSdtlsVrbREr+AbKCSIM9Gb7b8zyJR37ubKgnvRUcJO+IW+xesHstTpRSfb9dsXQ747/6fI04FsAv6UiWi/hXe840tirrJf2Nb9+s1EP9VJs9U9Yg6h5Zbj7PFf5hGH0Ypf+2tkKquqjOH9Cin7VvmZD5DLjI3bLkjINw7G4Ga6jiQdjdQDLov7yZMnmAYOLO8BLsWHI+DscLvOGz4ZCedPe2NsqF+Q376+oYpeIt+KX6KJHSFJy3eklfsaienP9t3tYM2Y8k1xMKGRxhnOh/FDo/KkN4rftz+KPguhJi6Z+ujTLbGdS8X/s5uE5BCgeXS85sSzmhl0tdyTez+KVwGP+ZDuQIainC6L+5hceT4= X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230016)(4636009)(346002)(376002)(136003)(396003)(39860400002)(36840700001)(46966006)(40470700004)(81166007)(356005)(82740400003)(186003)(2616005)(966005)(426003)(336012)(1076003)(16526019)(26005)(66574015)(47076005)(6666004)(41300700001)(7696005)(70586007)(110136005)(82310400005)(36756003)(40480700001)(478600001)(86362001)(8676002)(4326008)(40460700003)(316002)(5660300002)(70206006)(54906003)(36860700001)(2906002)(83380400001)(8936002)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Aug 2022 09:56:42.3116 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 87f2479b-80f4-44da-d6c9-08da79ed764c 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=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT068.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB3783 Subject: [Intel-gfx] [PATCH v2] drm/ttm: Fix dummy res NULL ptr deref bug X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development <intel-gfx.lists.freedesktop.org> List-Unsubscribe: <https://lists.freedesktop.org/mailman/options/intel-gfx>, <mailto:intel-gfx-request@lists.freedesktop.org?subject=unsubscribe> List-Archive: <https://lists.freedesktop.org/archives/intel-gfx> List-Post: <mailto:intel-gfx@lists.freedesktop.org> List-Help: <mailto:intel-gfx-request@lists.freedesktop.org?subject=help> List-Subscribe: <https://lists.freedesktop.org/mailman/listinfo/intel-gfx>, <mailto:intel-gfx-request@lists.freedesktop.org?subject=subscribe> Cc: alexander.deucher@amd.com, luben.tuikov@amd.com, kernel test robot <oliver.sang@intel.com>, christian.koenig@amd.com, Arunpravin Paneer Selvam <Arunpravin.PaneerSelvam@amd.com> Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" <intel-gfx-bounces@lists.freedesktop.org> |
Series |
[v2] drm/ttm: Fix dummy res NULL ptr deref bug
|
expand
|
diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index c1bd006a5525..590110fdf59c 100644 --- a/drivers/gpu/drm/ttm/ttm_bo.c +++ b/drivers/gpu/drm/ttm/ttm_bo.c @@ -912,7 +912,7 @@ int ttm_bo_validate(struct ttm_buffer_object *bo, /* * We might need to add a TTM. */ - if (bo->resource->mem_type == TTM_PL_SYSTEM) { + if (!bo->resource || bo->resource->mem_type == TTM_PL_SYSTEM) { ret = ttm_tt_create(bo, true); if (ret) return ret;