Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp2995142rdb; Fri, 22 Sep 2023 14:45:41 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEhPYWgHC6ixat9fjreAzN8NPpWlKhtCS12cZMrX8Stgh9bEWI1KtVyOUwKTnTjI5xuR1dv X-Received: by 2002:a05:6871:590:b0:1d0:f5bd:6e9 with SMTP id u16-20020a056871059000b001d0f5bd06e9mr649513oan.22.1695419140846; Fri, 22 Sep 2023 14:45:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695419140; cv=none; d=google.com; s=arc-20160816; b=nXa5Qyztz23F8LEhLX4dnrk7cYMBCapd0LjRBmzxGNT5jP1unBAA85mxShxRVt286V O1fzVoEJ4GkW0oSSZN39a5LJgc0M+Az3Qzc6FUqlGDDwaQ19+zh+pXoyQhmVkHncQAXI dvKk8Kh7dBMev5nreuobmXEN19F+qzCxe2GTenz592Dm3W6VI5rpqZrI0yPcFbAYeiDE L2DoiWr+f/RABVOU/27c7/RgYs0+c+r6vM0g60uyUZ/uZ1AXjLGquVTxJiLguQ7vlJcM erHsYEWkmjqoVjIvgLvp9gTbpQdJC9NL50tYe2uqokhGdjsW4pj8lBcHgSqJAnMQeiFH gBuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:organization:references:in-reply-to:date :to:from:subject:message-id:dkim-signature; bh=LHmkUSGxPrlIaYw9c6LuofpUkFimHOYZxkrmsFQmPvA=; fh=7QzKoIB4ZLzpFed+ws2BM8EGXFUYRQWSeUqh8+bAKZY=; b=kERT151sWTi4Nf1x+4hOq7q9a1A+kCQBsWzRc53wZWwvlSYJ2WBmgwtZo8OoFyN/X0 bnagl4JOcT/EG0H30eh1rux0qyczmLmNFUWmaQs3YGaBz8AsGujoy7EzL6CLzcZ9EORG NNU4UxdZ+HkNjkSvfTA16gkevw7nKi/+awSamRnh2FrDOlL1sMpWPf24qheVHQHGdhwr z8smmyNZhcM/bWXscekJYqWVWYpG3ae6juPUaBtEeXNhbHszKnl+DAf4bHY7Q1KyqUgP pSSaP9WiJumPKdOokuZg1eMAr3xGdbLsmd346Dv6Ne7MEiXQ+mG+zbiisiQwFaI6zwsw MFjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=JWfNJ3F9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id w67-20020a636246000000b0056fa98a8542si981765pgb.227.2023.09.22.14.45.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Sep 2023 14:45:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=JWfNJ3F9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 5DD4C81EB9C1; Fri, 22 Sep 2023 12:03:21 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232992AbjIVTDV (ORCPT + 99 others); Fri, 22 Sep 2023 15:03:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45574 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230086AbjIVTDU (ORCPT ); Fri, 22 Sep 2023 15:03:20 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 05B2792 for ; Fri, 22 Sep 2023 12:02:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695409347; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LHmkUSGxPrlIaYw9c6LuofpUkFimHOYZxkrmsFQmPvA=; b=JWfNJ3F9ydr/t6dCUrIDJXkg/KPcsvjZjTUBbsfhrb/0A508Rr4R02Ehy/kGDrmflgDDGs SypS41lbRL2YTroMa7Ymg1aqDiwR8IkkpAnx8mQxft89jIki6aQo0r2aDG6qkygrK3PfjV ScJ3pj2PEph/0Ao+SQ2SQyqIKUQnwaE= Received: from mail-qt1-f200.google.com (mail-qt1-f200.google.com [209.85.160.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-552-OgyQh32UOeKCXyLXLgAQ-w-1; Fri, 22 Sep 2023 15:02:25 -0400 X-MC-Unique: OgyQh32UOeKCXyLXLgAQ-w-1 Received: by mail-qt1-f200.google.com with SMTP id d75a77b69052e-417f94d6938so13932411cf.3 for ; Fri, 22 Sep 2023 12:02:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695409345; x=1696014145; h=mime-version:user-agent:content-transfer-encoding:organization :references:in-reply-to:date:to:from:subject:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=LHmkUSGxPrlIaYw9c6LuofpUkFimHOYZxkrmsFQmPvA=; b=evQr4tetWl9cFGpNqGvHTHIEZp4l5NGriKwoGNsc61jg8dweVf/4mZHaCAx51nfn0b IdYsG1fzyEUnEv8mttXF4NG3x+9VqEPC4CwsQGMqZwywblzBUxkP8p7rPzxgaA/fsmpN oCKEvegvCBk4BQf/n+En/18Qm/kChIPRSbR1RGCnxEoRQ/c82vCq3ZbD3ByweseFwFy6 1p/xsv1ReJL3SulTIjNsAVoabQ6CxT26EL6KsxCFWaiALnFsytVdLwIJ8WGgYvaLxD3O 32LX2zhcOFFadZjKGhtWvu0KTIztITVIs785T9niV3zt5j8g33T26L3zLaEWqQx/cCch bLkA== X-Gm-Message-State: AOJu0Yy0kNrGiOmZK3nLBD4B2cykmXgGrHUbeQ9nwAUUncRtakw3ioVn ZvXSlD1hbwAGkzgVtrLXKUHQDhKVivbk69v38xnPsCLMDu1XoIEUi68tHiDD3xeXuK/vANf3iDk 2mKYhavVaiTcCH0VCHKVB45xy X-Received: by 2002:a05:622a:3d4:b0:403:b4da:6e53 with SMTP id k20-20020a05622a03d400b00403b4da6e53mr341911qtx.44.1695409345031; Fri, 22 Sep 2023 12:02:25 -0700 (PDT) X-Received: by 2002:a05:622a:3d4:b0:403:b4da:6e53 with SMTP id k20-20020a05622a03d400b00403b4da6e53mr341894qtx.44.1695409344797; Fri, 22 Sep 2023 12:02:24 -0700 (PDT) Received: from ?IPv6:2600:4040:5c6c:a300::feb? ([2600:4040:5c6c:a300::feb]) by smtp.gmail.com with ESMTPSA id x7-20020ac87ec7000000b0041096c33d02sm639550qtj.17.2023.09.22.12.02.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Sep 2023 12:02:24 -0700 (PDT) Message-ID: <19ce2cd9abfd3bdf3ea91f9bceb43206e4740c2e.camel@redhat.com> Subject: Re: [PATCH v1] drm/dp/mst: fix missing modeset unlock for MST port detect From: Lyude Paul To: Ramya SR , David Airlie , Daniel Vetter , Wayne Lin , Jani Nikula , Imre Deak , Alex Deucher , Jeff Layton , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Date: Fri, 22 Sep 2023 15:02:23 -0400 In-Reply-To: <1694753689-29782-1-git-send-email-quic_rsr@quicinc.com> References: <1694753689-29782-1-git-send-email-quic_rsr@quicinc.com> Organization: Red Hat Inc. Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.48.4 (3.48.4-1.fc38) MIME-Version: 1.0 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 autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.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 (agentk.vger.email [0.0.0.0]); Fri, 22 Sep 2023 12:03:21 -0700 (PDT) X-Spam-Level: ** 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. >=20 > Signed-off-by: Ramya SR > --- > drivers/gpu/drm/display/drm_dp_mst_topology.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) >=20 > 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 *connec= tor, > =20 > ret =3D drm_modeset_lock(&mgr->base.lock, ctx); > if (ret) > - goto out; > + goto fail; > =20 > ret =3D connector_status_disconnected; > =20 > @@ -4181,6 +4181,8 @@ drm_dp_mst_detect_port(struct drm_connector *connec= tor, > break; > } > out: > + drm_modeset_unlock(&mgr->base.lock); > +fail: > drm_dp_mst_topology_put_port(port); > return ret; > } --=20 Cheers, Lyude Paul (she/her) Software Engineer at Red Hat