Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp3061282rdb; Fri, 22 Sep 2023 17:42:37 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGy1w5JDCP2FoQYY9F7OpPV3bZKWFE06X1FwXhm5wkTQ/sHc+zFRGHGjukqO9qThJ89c+3f X-Received: by 2002:a05:6a20:9383:b0:15a:1817:c493 with SMTP id x3-20020a056a20938300b0015a1817c493mr1191410pzh.39.1695429757329; Fri, 22 Sep 2023 17:42:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695429757; cv=none; d=google.com; s=arc-20160816; b=Do6U/vW6knj2vx9I/Ovsd7FfPFNlFShjlJZtA7mQGR9UrPQrgllPoxShkfESUEWkae 9JF5qSNErDTKOiS+CSWGGN0gPMvYgfoWnKxAzwLIIkDSfNQK4OLhqWjMpVkFkdz6xiuR HdvroAEcvBKQHsY/FiZTyoGzqQTKy70opDlm7MuoHogIK6qZO+S57q/GHDXUClUwjiVy A/CPdriF4StHNQLPMHKG/pqkFH2fCdSs04NjMHOsm41vZuqrqmHbPY1BPVHx5x8kcieq 5gHjco888rxLE6VNs+9ClO/cUJiLdg5dNb7qi+kkw6pRLnM0xneuItQUU5Xb1pWIkC0L N56A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=snWofKInOgHsHdWFIRZGSHZyGke0WKkHHuVdKbdzZmg=; fh=WR/T3zU6rxeOwYAP9gIdbJLPwO78UjA2ZX4pqee7qzo=; b=i/73YRStlP7WbbCv2SsGq4hOPFJmPQdw7C+wmi1YHWTLv8rREUjoezDa8l3HUO4WlQ fdVYlpIR0Xg2zuTWku3F/wDC8f6FsGkKdxtmpRRR1FYvVFWX90x0hPyxnI1YgiRZ3Ma0 8JAKqy/DPeV1o98BxIiagAi1tdIhrvOdiAtbpSC0CM53mfORHPQ+nN3wsgggDdR+8Ac/ E5qFWZ0B29qBC3Yvh1oH3Forf7BNXVDAseUQroduAFPWij7zXr/n9fxIXNJbqC23K2it n3AyZAWvPVDzQP2qKKOdto3OpEbZ3YDySzovNd8h9RZGYflWSNah6xmZRKy9PqWVt7HZ 9gqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=CtFB6ulY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id o1-20020a170902d4c100b001bbd639dff9si5366868plg.467.2023.09.22.17.42.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Sep 2023 17:42:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=CtFB6ulY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 2BC4680F728C; Fri, 22 Sep 2023 12:22:26 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233599AbjIVTWK (ORCPT + 99 others); Fri, 22 Sep 2023 15:22:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50154 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229590AbjIVTWJ (ORCPT ); Fri, 22 Sep 2023 15:22:09 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 320C9A3 for ; Fri, 22 Sep 2023 12:22:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1695410524; x=1726946524; h=date:from:to:cc:subject:message-id:reply-to:references: mime-version:in-reply-to; bh=nvcrQo2rL5r9UFSm+cmfQJnb28t5Kpu5MR2khnCIlMk=; b=CtFB6ulYab+549jKJj4LOoNGgmGcNP4HYt2xcguvaAbrZDaxTqM53odX 1hg5wmghIxXLiBvNKczWiscOPMIq85Kbq+2DihYSGd2UWlS+xW/+cnXPf lD9Y6it1cq5Jr1HKZwg9Ltv2iWLFwXGvfIQPCpAbXvUjTUTwrlXOQbGoG wpc7DtyQquSfyaMrixieU0PdrSGvdAeqb6aL/HwsI44AXKV//WKdZojG9 UDFzDfN4oM4Ywx0zhnBKjK6E4ctBdoGlxUoyviiQlxYTesMC6DgEAvqUZ Ew6vrLsOgh6stQ4tWNUxZKE5EoAN4fBVGEu/5DsvMHHIkx3SpeJRuhwhE g==; X-IronPort-AV: E=McAfee;i="6600,9927,10841"; a="360303436" X-IronPort-AV: E=Sophos;i="6.03,169,1694761200"; d="scan'208";a="360303436" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Sep 2023 12:22:03 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10841"; a="817915002" X-IronPort-AV: E=Sophos;i="6.03,169,1694761200"; d="scan'208";a="817915002" Received: from ideak-desk.fi.intel.com ([10.237.72.78]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Sep 2023 12:22:00 -0700 Date: Fri, 22 Sep 2023 22:22:21 +0300 From: Imre Deak To: Lyude Paul Cc: Ramya SR , David Airlie , Daniel Vetter , Wayne Lin , Jani Nikula , Alex Deucher , Jeff Layton , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v1] drm/dp/mst: fix missing modeset unlock for MST port detect Message-ID: Reply-To: imre.deak@intel.com References: <1694753689-29782-1-git-send-email-quic_rsr@quicinc.com> <19ce2cd9abfd3bdf3ea91f9bceb43206e4740c2e.camel@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <19ce2cd9abfd3bdf3ea91f9bceb43206e4740c2e.camel@redhat.com> X-Spam-Status: No, score=2.7 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Fri, 22 Sep 2023 12:22:26 -0700 (PDT) X-Spam-Level: ** On Fri, Sep 22, 2023 at 03:02:23PM -0400, Lyude Paul wrote: > > Oh! wow thank you for catching this: > > Reviewed-by: Lyude Paul > > I will go and push this to drm-misc-next in just a moment > > On Fri, 2023-09-15 at 10:24 +0530, Ramya SR wrote: > > Modeset mutex unlock is missing in drm_dp_mst_detect_port function. > > This will lead to deadlock if calling the function multiple times in > > an atomic operation, for example, getting imultiple MST ports status > > for a DP MST bonding scenario. > > > > Signed-off-by: Ramya SR > > --- > > drivers/gpu/drm/display/drm_dp_mst_topology.c | 4 +++- > > 1 file changed, 3 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/gpu/drm/display/drm_dp_mst_topology.c b/drivers/gpu/drm/display/drm_dp_mst_topology.c > > index ed96cfc..d6512c4 100644 > > --- a/drivers/gpu/drm/display/drm_dp_mst_topology.c > > +++ b/drivers/gpu/drm/display/drm_dp_mst_topology.c > > @@ -4154,7 +4154,7 @@ drm_dp_mst_detect_port(struct drm_connector *connector, > > > > ret = drm_modeset_lock(&mgr->base.lock, ctx); > > if (ret) > > - goto out; > > + goto fail; > > > > ret = connector_status_disconnected; > > > > @@ -4181,6 +4181,8 @@ drm_dp_mst_detect_port(struct drm_connector *connector, > > break; > > } > > out: > > + drm_modeset_unlock(&mgr->base.lock); Isn't this supposed to be unlocked only by drm_helper_probe_detect_ctx() / drm_helper_probe_detect() ? > > +fail: > > drm_dp_mst_topology_put_port(port); > > return ret; > > } > > -- > Cheers, > Lyude Paul (she/her) > Software Engineer at Red Hat >