Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4615898pxj; Wed, 12 May 2021 09:18:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxmDbR7JnAFRNixSXTBhYAFAfZbF+7rvEe5FaCGmpWFz+Kv+MPyFkK13oPPMrCeAE4eROz5 X-Received: by 2002:a05:6000:4d:: with SMTP id k13mr46843107wrx.98.1620836294371; Wed, 12 May 2021 09:18:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620836294; cv=none; d=google.com; s=arc-20160816; b=iM/927k8GvOzujrt8daZliPES+aM0q7hPlHekJuavSatX7ZG9hTR1SzjxEgLnhl3pH 3NWHxl8D3fpBCnNEGGY4EmBgUvtan5IGg5pm0nrQii+mB4Tpt4zZiP25iSdU5UIpI+WE ME3zBWRnEXfHoTD6KbwV1zq2c2qF9Kt4lhp1F024RF7+LCNO7hh70gRA7QWwavulrlAC m5z3oJZu6TV1EKWeRlwpqSwMistXJE8A1fVaIr9veb5jLXFRwENiRVeWb0k5JAaL5Hzg 62XkF8zAkH4wcxYqdCuoO6sw1lTk41sYJlQEcsayAiint9V5lEz7FJEHO5rmcHBR4hVy fw9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=5ttLGt0ewsfcxXIaiR9yywx51UoVLgfcy2RV68Dv9hc=; b=QGBHIIi9Nqpghi7oJH+9ZNZQO0Ed15yHcYQA8eKiCWKBeTAw/EjhM34nBFkVKAN4Y8 j3rRk4TM4BmEm00ZVGnCO77JGiuMwILSNRW/lV+Yl6ao2A0KJVrMP1xL7TAQP8ACQPZP irAHVvn/xDh/bcaSfc5g0xtV7liCefTUEO7a63Cp8rIDDBXrqSOVRpsvU5qU5GSFWHzs nXOOJD/bV95d3b5J01nZS2Zpadvb7TW38PoxfEOL6EMR7OxU+ujoxxCtm8FTA68beFyK whUU3l5DKZjlRLuCjj1ClXzId5YJZimhwcp2CrgAnCDOvRFwidosmQcKSfx6BFGQq4P8 7R0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=2Qahg9Pv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d12si267529ejj.296.2021.05.12.09.17.49; Wed, 12 May 2021 09:18:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=2Qahg9Pv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234555AbhELQMy (ORCPT + 99 others); Wed, 12 May 2021 12:12:54 -0400 Received: from mail.kernel.org ([198.145.29.99]:48196 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233176AbhELPat (ORCPT ); Wed, 12 May 2021 11:30:49 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 127486194F; Wed, 12 May 2021 15:15:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1620832554; bh=UtdNivacHThNokihCSBKtp6WYfjbh9GlWT3m3yjRgSU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2Qahg9PvrIWzi7hdJEntT87qkAQAg1A6m/x0gC9xkt4QPOcn8KLLINVpUsiv79ydR 0bb+PmYO2jo+Y9FyYmebCJwu6vILWt/Hoz2BJErDtfYUJB+BMZowsOycadiM28cDf5 rdY8kdeuFm3Mgs84O9yspH3ri0DPk7dQ23Q19KAA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Yingjie Wang , Alex Deucher , Sasha Levin Subject: [PATCH 5.10 326/530] drm/radeon: Fix a missing check bug in radeon_dp_mst_detect() Date: Wed, 12 May 2021 16:47:16 +0200 Message-Id: <20210512144830.524382697@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210512144819.664462530@linuxfoundation.org> References: <20210512144819.664462530@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: X-Mailing-List: linux-kernel@vger.kernel.org From: Yingjie Wang [ Upstream commit 25315ebfaefcffd126a266116b37bb8a3d1c4620 ] In radeon_dp_mst_detect(), We should check whether or not @connector has been unregistered from userspace. If the connector is unregistered, we should return disconnected status. Fixes: 9843ead08f18 ("drm/radeon: add DisplayPort MST support (v2)") Signed-off-by: Yingjie Wang Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/radeon/radeon_dp_mst.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/radeon/radeon_dp_mst.c b/drivers/gpu/drm/radeon/radeon_dp_mst.c index 008308780443..9bd6c0697538 100644 --- a/drivers/gpu/drm/radeon/radeon_dp_mst.c +++ b/drivers/gpu/drm/radeon/radeon_dp_mst.c @@ -242,6 +242,9 @@ radeon_dp_mst_detect(struct drm_connector *connector, to_radeon_connector(connector); struct radeon_connector *master = radeon_connector->mst_port; + if (drm_connector_is_unregistered(connector)) + return connector_status_disconnected; + return drm_dp_mst_detect_port(connector, ctx, &master->mst_mgr, radeon_connector->port); } -- 2.30.2