Received: by 10.223.164.202 with SMTP id h10csp2070011wrb; Mon, 27 Nov 2017 11:24:46 -0800 (PST) X-Google-Smtp-Source: AGs4zMaszRTwOEpl1b1lOKdNqBUV0ha68GXp1OZ9RH3l88N9eMIUfKSwjnub7EZCTghwxKZ+TfRo X-Received: by 10.101.85.3 with SMTP id f3mr37619869pgr.45.1511810686542; Mon, 27 Nov 2017 11:24:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511810686; cv=none; d=google.com; s=arc-20160816; b=C/rEXYgWJPiu8/iSBNV1RwX/3YFuOfoT6pqe0cE2Nsu1GslEfN2ntqlytC+zvYRme2 BO4++Ht4YYg+ZfTytRpLpUdR8NqfDTE2mHbZDDaRCqoUf+1HpvkaOtLdPXJnZf8loy/0 MRs+kTpl3k6iYLyAW2hwQBaQL2xK2zL6yH690QRyHVBULP/VLlJG7el8ZJLkV5l4EP72 uC5PAXu7tgnevhREej0m5T39xYkcr7XxC8yR7VnBgODXDcFa5A6M/RfIQLc4oePCGiN5 2gSSR068dBGwVsPs1yafcNVmZfDyO1X6w11J+zhCtJNTVwLQLLPc5EVoQSA+ugqXS/k5 jEwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature:arc-authentication-results; bh=zJ6JkDVXeTXecvn6z4QdELSsd3sxCmUeVEAGcDCCMM4=; b=iT5qz72J30zIbI0RV7S8tfTu1Ukj/xzgmh5NIWb/kGAU7dBO25VwLl9gOuPVHbqgz0 vnA1wzdlMPooHFOubKD7hk9FL+Xjgj7Msq9KQpm0+sygSUU+jqbkEz9gEu/23loJ5WZM efL02zBJHuckhtuHby4m6lqU7SmWuaIrCZAWfPUOEPVmakpACmZc++zFwnjXE8cnaz+j MYMtH5y8THWy0sMn2BS0SZfs6OXhHXvNejhqMoBb1bzMgqK8ga+7H5+J91a5vymOty2e k6LDwRrHD6K2f96BB94G35G+9uip78Q6l4T0LsIGykuBzrJ/GDmPT0twdMgBEYhP/fB5 C4CA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amdcloud.onmicrosoft.com header.s=selector1-amd-com header.b=0zY7BdCg; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t3si23960148plz.207.2017.11.27.11.24.34; Mon, 27 Nov 2017 11:24:46 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@amdcloud.onmicrosoft.com header.s=selector1-amd-com header.b=0zY7BdCg; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753491AbdK0TXV (ORCPT + 79 others); Mon, 27 Nov 2017 14:23:21 -0500 Received: from mail-co1nam03on0072.outbound.protection.outlook.com ([104.47.40.72]:30944 "EHLO NAM03-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751537AbdK0TXT (ORCPT ); Mon, 27 Nov 2017 14:23:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=zJ6JkDVXeTXecvn6z4QdELSsd3sxCmUeVEAGcDCCMM4=; b=0zY7BdCgCH1Anti0+zm0GYU+J0eHlNq1hDPc7rw1I8UuhvBxdVmBsQr0aKI1d8BBhTNH2kkySG5XI50EcgAh6h3ocMa9FF33I8b5QDFkragtFyxEF0WrjaaMOG6fUizAuLI1nzkGoa8w3vTgnnIr0wYvmseqE2YE3O8WVfg4zXs= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Harry.Wentland@amd.com; Received: from [172.29.156.71] (165.204.55.250) by MWHPR1201MB2478.namprd12.prod.outlook.com (10.172.95.136) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.260.4; Mon, 27 Nov 2017 19:23:16 +0000 Subject: Re: [PATCH] drm/amd/display: Fix potential NULL pointer dereferences in amdgpu_dm_atomic_commit_tail To: "Gustavo A. R. Silva" , Alex Deucher , =?UTF-8?Q?Christian_K=c3=b6nig?= , David Airlie Cc: dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org References: <20171127145700.GA18395@embeddedor.com> From: Harry Wentland Message-ID: <3ff97f37-946a-a795-e57c-6d835e93be21@amd.com> Date: Mon, 27 Nov 2017 14:23:12 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <20171127145700.GA18395@embeddedor.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [165.204.55.250] X-ClientProxiedBy: BN4PR12CA0020.namprd12.prod.outlook.com (10.164.241.30) To MWHPR1201MB2478.namprd12.prod.outlook.com (10.172.95.136) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: ec316b21-8d16-478d-697d-08d535cc501b X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(48565401081)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603199);SRVR:MWHPR1201MB2478; X-Microsoft-Exchange-Diagnostics: 1;MWHPR1201MB2478;3:RbUX7S7cI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8tFsqz9AHur/hAet/Ol30W66LhJaNag7DFfNOuvR2V475gXh8tPpWmLakcDPEbOWBdhI2aLiL7rsy+UpuUwM/8Gxh9Vb0qKR7vXzVAHSEC0wip8jP92/rX7kIAf3H3z7YZlW1YZvi4tWlXRsLgwRBAJ8NPQKKCUKBKNWZiXExwCitF8dp5J6UAGbiwXkDbgclhkxe7tocYOElhmu8wA9N0UP/BINCixeJsLK375iraGHx5TW83cfdl9ryvaab4GEFpPW4h2UFzPrvFHtd83UWr40Yx3jjXgMZaMX8HFoF97KyKIv6ojp9F6DacWfzh1wYu+N/gHXAh;4:yDKS/H7ibjkpA0a2K2KC024JCNeb2wF1HlF16HSVS/tju2qK58pnnLFM8zDJhtUubivDN1NowUKiEEMedaedGn9duY4xFDo/A1X5JEUf6oG7JzvkH2FwW3EXYdXmL8c+7PLF3XwTwKBa68G0zygDZ5Mtv5seC/WRC6iZerac62aFNjKPwxe7u70a1J0R0GDjOx+jnbCOpuZxNeGh7Z6n7qMi1YyI+Q59jeXS8iT2ovvMQLlV4+KBl+0ooHnbysvHd2YajJ2MWfAkVVzOsxejiyI1QG2bWFYbfSTVI2+1XqVNNpSG2M0AnemerB59+7FKIUEvod+gJ22g5T1oqETg0A== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110)(217544274631240); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040450)(2401047)(8121501046)(5005006)(3231022)(10201501046)(3002001)(93006095)(93001095)(6055026)(6041248)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123564025)(20161123555025)(20161123562025)(6072148)(201708071742011);SRVR:MWHPR1201MB2478;BCL:0;PCL:0;RULEID:(100000803101)(100110400095);SRVR:MWHPR1201MB2478; X-Forefront-PRVS: 0504F29D72 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(6009001)(6049001)(39860400002)(366004)(376002)(346002)(199003)(377424004)(189002)(24454002)(50466002)(31686004)(16526018)(478600001)(58126008)(64126003)(68736007)(189998001)(316002)(65826007)(25786009)(16576012)(5660300001)(966005)(6666003)(2950100002)(76176999)(305945005)(7736002)(53936002)(50986999)(230700001)(54356999)(81166006)(72206003)(31696002)(97736004)(6246003)(36756003)(110136005)(53546010)(4001150100001)(33646002)(6116002)(81156014)(3846002)(86362001)(8936002)(23676004)(52146003)(83506002)(2486003)(77096006)(52116002)(6306002)(2906002)(66066001)(65806001)(65956001)(101416001)(8676002)(47776003)(4326008)(6486002)(105586002)(90366009)(106356001)(229853002);DIR:OUT;SFP:1101;SCL:1;SRVR:MWHPR1201MB2478;H:[172.29.156.71];FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtNV0hQUjEyMDFNQjI0Nzg7MjM6b2FqTmNtMS9JTUVzbkRhUFBQT25iKytr?= =?utf-8?B?RzFTa0dZQzcxT3gybzBseVhoaWs3VVJlNHlMb3JCNzhjZFZhckJqSlIzMHpP?= =?utf-8?B?S3lrRzVubXV4cng3OGduMVRZcXN5OWI1THljR3U2aldsTmxXVVMwTyt1WG43?= =?utf-8?B?VnBkMXliUHlHVURuY3hFdEtpbDY5eTBLQlplRk9XTVQxWXRxWFlRNU93Q0Ey?= =?utf-8?B?U2gyZU8yeEM0U3VLYWpOL0l5UGJySlNabGE0T0NoVUgwYXFwOWdSR2xFb2s4?= =?utf-8?B?L1FMODVlamJjdnMyRnRYOGxkZ3M5N0gyVXl0ZDZZcThjbldPNVJCL05TanBs?= =?utf-8?B?dTQ1ek1QUHR1MmM0ZVlNM0J2NElRL3JDc3FaWjI5N0hlVWN1cWJQd2pxUm1E?= =?utf-8?B?VVdWejZJMGZ2QWN5Zmh2ZEd1anhxelFiS09uNWJScG90cmo4a3A2ekwvc0NJ?= =?utf-8?B?eEF4VXFycWRPL3lWMm1vOWgrVG9nbUJxeE5Id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orOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Nov 2017 19:23:16.4804 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ec316b21-8d16-478d-697d-08d535cc501b X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR1201MB2478 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2017-11-27 09:57 AM, Gustavo A. R. Silva wrote: > dm_new_crtc_state->stream and disconnected_acrtc are being dereferenced > before they are null checked, hence there is a potential null pointer > dereference. > > Fix this by null checking such pointers before they are dereferenced. > > Addresses-Coverity-ID: 1423745 ("Dereference before null check") > Addresses-Coverity-ID: 1423833 ("Dereference before null check") > Fixes: e7b07ceef2a6 ("drm/amd/display: Merge amdgpu_dm_types and amdgpu_dm") > Fixes: 54d765752467 ("drm/amd/display: Unify amdgpu_dm state variable namings.") > Signed-off-by: Gustavo A. R. Silva > --- > drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 12 +++++++----- > 1 file changed, 7 insertions(+), 5 deletions(-) > > diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c > index 889ed24..3bdd137 100644 > --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c > +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c > @@ -4190,6 +4190,9 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state) > > dm_new_crtc_state = to_dm_crtc_state(new_crtc_state); > > + if (!dm_new_crtc_state->stream) > + continue; > + > update_stream_scaling_settings(&dm_new_con_state->base.crtc->mode, > dm_new_con_state, (struct dc_stream_state *)dm_new_crtc_state->stream); > > @@ -4197,9 +4200,6 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state) > WARN_ON(!status); > WARN_ON(!status->plane_count); > > - if (!dm_new_crtc_state->stream) > - continue; > - > /*TODO How it works with MPO ?*/ > if (!dc_commit_planes_to_stream( > dm->dc, > @@ -4332,9 +4332,11 @@ void dm_restore_drm_connector_state(struct drm_device *dev, > return; > > disconnected_acrtc = to_amdgpu_crtc(connector->encoder->crtc); > - acrtc_state = to_dm_crtc_state(disconnected_acrtc->base.state); > + if (!disconnected_acrtc) > + return; > > - if (!disconnected_acrtc || !acrtc_state->stream) > + acrtc_state = to_dm_crtc_state(disconnected_acrtc->base.state); > + if (!acrtc_state->stream) > return; This part is already in https://lists.freedesktop.org/archives/amd-gfx/2017-November/016389.html on its way to be merged. The rest of the patch is Reviewed-by: Harry Wentland Harry > > /* > From 1585231621948212728@xxx Mon Nov 27 14:58:03 +0000 2017 X-GM-THRID: 1585231621948212728 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread