Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp1028987lqe; Sun, 7 Apr 2024 15:47:33 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU4DnrByTB2ZeCKLPM4lVcAJTUsbDc4z8a1YDV63WThr/kylk9v0t1sx9B6INpq9hqisscZB3kpd3Zs3MXzu/FFV0WfZ9A/JWdtyBfyEg== X-Google-Smtp-Source: AGHT+IFK2MEaBtfHx+WH8z4sPelt6b7koWDOFKdjosFKiDgfJLQlRr5cvSV8GiB51YKymN3ZpDfW X-Received: by 2002:a05:6808:60c:b0:3c5:ed48:aeac with SMTP id y12-20020a056808060c00b003c5ed48aeacmr3707859oih.15.1712530053532; Sun, 07 Apr 2024 15:47:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712530053; cv=pass; d=google.com; s=arc-20160816; b=ErVZ7KRsVdH1hDOzekdht85G03E81Aj2fel22B4JFrB/fxsyGmFKEBTN9O0UKSN1+E 6bLbqxNG3YBjr6YKXGSKIhRckRhkWZ8sQ/RqKbuTgnjtRzeIwAN3KlMLREIk8snJoDB/ AtqEKYl+cMAzh1hRfC8y6QVX/GrOXJnTfxXcrh4CUtNkTtuPLwdGejVNSzvR0UlFBDbU TCHiUeqTGM3qOv3xXN1VXmd5F9AkXv7lPsdTHxa4+NWgrlc7yhaWVBDwoRP5MNxNGqxm hdRNW55OQ6ObMr0aFS0zCw+EfrHDE7/nC0d1nsoiZTNw32vSybl5zLViiH63j6053E+v X0uQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :dkim-signature; bh=nQNYObhRI+L+iMTgrH55FYC3oUBM9fgxDq9UB6KvUqQ=; fh=4cty4F1a0vKMcZXpL3w81umM4SbRt1WLX1+0K72K5po=; b=cYpRzW3U8Lab6IHSRQHW1uy+WdmO9wRTu4fO240yVBQiEwTdA4tfAgzj7Bp23H9IMY /2cpi2w28QKNq2lNChFnVwCdUsd06mTSuZ/MwaYGm59Gu/7iS12wO4VC1fR1TGU6sphX AOR4r9L9JeMDmhLNJ/gXw7XLi1AQbICqSCk7zlnNX6ZAkeAP9sTA9u1ms8zivFQhhoKR NPiV3zV9vfzQ/BawY6jhjKLlpVqCrxwZPehboukrvICDmD5WrZlmfsNS7FZHUadKoPP0 ai1D5fyLAeIolGmFvu60sVhsnR/PNL1rRiQEuHNRKut3UXskWnsxpbTjaasULbTRcWOG zSdw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=crwQIsSr; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-134657-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-134657-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id m19-20020ae9e713000000b0078d67d6c88bsi216193qka.249.2024.04.07.15.47.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Apr 2024 15:47:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-134657-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=crwQIsSr; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-134657-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-134657-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 0DB341C20C8A for ; Sun, 7 Apr 2024 22:47:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 65C7D3C08D; Sun, 7 Apr 2024 22:47:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="crwQIsSr" Received: from mail-yb1-f173.google.com (mail-yb1-f173.google.com [209.85.219.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2147B22318 for ; Sun, 7 Apr 2024 22:47:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712530042; cv=none; b=CzPNdieIlp6BqjMyGKsILb/SNm64Yg7umQ2TjFPeA1Lcch60soNnk9ZksVNqfMNZE8d7aSj3QcM7zcKkjMlf6pOhcYGd8jY2V7Qu7s/kYUv5xJ5q+Tzczbe3wedlYAP1IDP2ohcAlaVx9XGF/zk/CmnZMIsx8567G57iQ6PhQ+I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712530042; c=relaxed/simple; bh=cYPJsLS2G4LFo5gdhX3bUtU8WUtFxavLfQpIQuT7eNk=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=t6I9qnE7TbA2+Tseq2xX22vScVxj7bJPibpobneDEQcAJYIqXFfG40oo06Zt5pJy3S9Q0RrPWGIEKOryMDohpP7Bcja42cb4D8FfE4FUPBkyAj31y7yZZUBmfX6x/djmlnptDjRP9QDKajeVuZBsfi4W2ERjv/fq2ogPnff2OOw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=crwQIsSr; arc=none smtp.client-ip=209.85.219.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-yb1-f173.google.com with SMTP id 3f1490d57ef6-dc6d8bd618eso3644868276.3 for ; Sun, 07 Apr 2024 15:47:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1712530040; x=1713134840; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=nQNYObhRI+L+iMTgrH55FYC3oUBM9fgxDq9UB6KvUqQ=; b=crwQIsSrlx93WcSP3CtqTwtvaTR5Xttmv0Yl94zKhJtwpZE7/nL5OlYWBFqIjOgoE5 F8W2JcxK5g2CsYJmHjFiSi81t1z8MFyIQENQFxOfoAUbi8l7/ARFTuC0ZsJfgn93T0Rw uxBBE1ks3oVwa2qjk1EBkAz2nnuo5Yb4rnmjqOtOPQakLRsuFfnOfNMk5IIIqAwhfzzD E4eC/6w+R6k+WFGNabbtpRcd9bTEgDObSrpW+yx8tY9pw+y+2+5HypTNJ9yMiDc0c0rw ZuSBoYdzo1z6KcI/wI5hxQteWpNVPy7ZX9A3p9G6O7e7dFtqqSSJm/3o+cqcPZmoW/A7 tVtw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712530040; x=1713134840; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=nQNYObhRI+L+iMTgrH55FYC3oUBM9fgxDq9UB6KvUqQ=; b=bGVfj982fL66RhcXEfmiEqwAxqBNhGEBan90zvsliXMgs4hX9KphRO3JLFwnBi8h12 qOoSh9iry2NL7MuFARWY3918nX8POJ8otSIxY2We2uzbeCergK/uH8yLORgn3hvQ1d60 GNoh5j5+vwntrxVtdSxt2Zhy6zmGYLpyPPPhJpPz1k0iTXyqt0YswX2X2dHb/SANM5Hi oLi1lAktVXzNXnssKNRF1VeRILBkIqPQeiqA75nnTsgZC9ChP8cAXInlx3aGpZEgnYD/ gGtuLldUEwYRnSV/CUeyvErjTns8POpaHMs405y3224y0J7SvXVWGDwo+GR3MC2+5Nms ay/A== X-Forwarded-Encrypted: i=1; AJvYcCWAgZ25d8csmU+bvfjnF1TmMLU2DVchM+L8uKb3e5bkvVHNM13TD+1WZYycZmE0cmfYYhwEamIgGT6IjT9buWpZ2ue7+s0UdeekLrkV X-Gm-Message-State: AOJu0YxmWXzTcC6F41Mfd44hW5DTcjtxLZno061rGinwIHQGPNFnwUAg K77GiBt3zzx6ZEJM6INI+7AUNWcAN1RAL2J/l7Cze5Z/rmloQi/aLN7b1cy5a4Ws44ZQ8B+IFkx zPw+qDN5kszvqEY93JkvJxdTahMGiaBW60SRVVg== X-Received: by 2002:a05:6902:c12:b0:dcc:375:2257 with SMTP id fs18-20020a0569020c1200b00dcc03752257mr6845376ybb.0.1712530040073; Sun, 07 Apr 2024 15:47:20 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240405-qc-pmic-typec-hpd-split-v1-1-363daafb3c36@linaro.org> In-Reply-To: From: Dmitry Baryshkov Date: Mon, 8 Apr 2024 01:47:09 +0300 Message-ID: Subject: Re: [PATCH] usb: typec: qcom-pmic-typec: split HPD bridge alloc and registration To: "Bryan O'Donoghue" Cc: Heikki Krogerus , Bjorn Andersson , Konrad Dybcio , Greg Kroah-Hartman , linux-arm-msm@vger.kernel.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Caleb Connolly , Johan Hovold Content-Type: text/plain; charset="UTF-8" On Sun, 7 Apr 2024 at 22:32, Bryan O'Donoghue wrote: > > On 07/04/2024 16:08, Dmitry Baryshkov wrote: > > Basically, if for some reason (e.g. because the TCPM returns an error > > to one of the start functions) the drm_bridge is destroyed, the DRM > > driver isn't notified about the event. It still keeps the pointer to > > the bridge pointer and can access freed memory afterwards. > > Hmm, my concern/question is about the TCPM code triggered by an IRQ > firing here, racing with the bridge code. There is no actual race. In the worst case scenario, the TCPM will bring up the DP altmode and the altmode driver will send an OOB HPD event. However as this is an OOB event, the DRM subsystem correctly handles the case if there is no corresponding connector. > If you're happy you've reasoned about that and it won't happen, then > apply the ACK with the commit log fixed alone. Thanks! -- With best wishes Dmitry