From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 03E2AC47088 for ; Wed, 30 Nov 2022 18:55:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231588AbiK3SzR (ORCPT ); Wed, 30 Nov 2022 13:55:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46432 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231603AbiK3SzO (ORCPT ); Wed, 30 Nov 2022 13:55:14 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2FC4999F11 for ; Wed, 30 Nov 2022 10:55:14 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id D6783B81CAC for ; Wed, 30 Nov 2022 18:55:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3D36AC433D6; Wed, 30 Nov 2022 18:55:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1669834511; bh=WX4oFpBuivAEH3Atm49kqOuBUqSZBeAYJBFKI3hSAds=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JvCAX/KUKBXm9WTeIyFT/lOuFEgs+6UzE0mIbJIJe0Ya0SEDHVwc4fiPY4EvnQbIF 5X/6bNMESMVv2WQf2XgW53cP3pb2EyAu8MoyK0Rk9BBOem0Wy+Z+/BUzYPQlZJUR2g p139hVAjcMuxM8YdXngNI4/BI1jnIxQv8w+raZOI= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Lyude Paul , Wayne Lin , Alex Deucher Subject: [PATCH 6.0 280/289] drm/display/dp_mst: Fix drm_dp_mst_add_affected_dsc_crtcs() return code Date: Wed, 30 Nov 2022 19:24:25 +0100 Message-Id: <20221130180550.450735110@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221130180544.105550592@linuxfoundation.org> References: <20221130180544.105550592@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Lyude Paul commit 2f3a1273862cb82cca227630cc7f04ce0c94b6bb upstream. Looks like that we're accidentally dropping a pretty important return code here. For some reason, we just return -EINVAL if we fail to get the MST topology state. This is wrong: error codes are important and should never be squashed without being handled, which here seems to have the potential to cause a deadlock. Signed-off-by: Lyude Paul Reviewed-by: Wayne Lin Fixes: 8ec046716ca8 ("drm/dp_mst: Add helper to trigger modeset on affected DSC MST CRTCs") Cc: # v5.6+ Signed-off-by: Alex Deucher Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/display/drm_dp_mst_topology.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/gpu/drm/display/drm_dp_mst_topology.c +++ b/drivers/gpu/drm/display/drm_dp_mst_topology.c @@ -5293,7 +5293,7 @@ int drm_dp_mst_add_affected_dsc_crtcs(st mst_state = drm_atomic_get_mst_topology_state(state, mgr); if (IS_ERR(mst_state)) - return -EINVAL; + return PTR_ERR(mst_state); list_for_each_entry(pos, &mst_state->vcpis, next) {