Received: by 2002:a05:7208:3188:b0:7e:5202:c8b4 with SMTP id r8csp893289rbd; Fri, 23 Feb 2024 06:54:52 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWb/5Yw6/9i8qQDAEz7d/ys56xQkJ9oR/3AfzVBTInszLh3wlFBJjLMVkZak1TAUbluURc52JmeeRLoJaMdXHaIjaEY8pQINGQhJyfaDg== X-Google-Smtp-Source: AGHT+IHEV4q5yFaQ8YGdAuXYwBDO0hDjKIpSviQq+mInsaB6+X7EtmKo8BwYDp5de9EC3UlGxXnP X-Received: by 2002:a54:4098:0:b0:3c1:83f6:cbc3 with SMTP id i24-20020a544098000000b003c183f6cbc3mr25324oii.43.1708700092135; Fri, 23 Feb 2024 06:54:52 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708700092; cv=pass; d=google.com; s=arc-20160816; b=zX4/Y6UFAnQJL/HMbVImJKvLBcVgCz7iQlAk64KYKVOhcJLnRh/x+3Hzn+EveEFXVj FO1uuFre2SxD7M3dHIyW6x4rReA1NiFLvvQwbm2JEaEdYb6jpICCKl6JLsxAVmtfP/W0 +zqSmkfbCRKDUhQ27OIZZ6nYhET403qbhpTzehD6jkSYDY6FcFV4ZRJin88DUOgEXZTG 1a2C93gbnaENIQ/I0SNP8Dgd568Q9KEcZonbTh6jm1kaZEtLU4+yBvNgIxMxf3e2xPfh MFSIJZwahUHrx/OuGGJktmZdM21j9L29BQqi8V4unIhagudol00tXOnExqpJGNodObSt eIdA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:organization:autocrypt :references:cc:to:content-language:subject:reply-to:from:user-agent :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :date:message-id:dkim-signature; bh=cNUbkWdNlhpKbmxfuu6qZOk5j1wm/SN92RpylpPx2rA=; fh=kUFBQiK1fJmQ3GGen57RYnw8as4YHz8IvQ7/g6qQU8k=; b=MnIb33s4UEE5w4dNRNLcL8fCR9+IrNHHLXpdbHphgv2Bya3DzYq1+7fTS9GAdUjyNh Ryq7dCqr5EpnRjimESIjmuz+l9zy0hl31KO/h0TJnrpSSUkNjyvwYbMpwuicsiHwIxQZ zty6ViCzjNDfnXVscX/fA81E5OHNoD+d/t9eaF5FpjTD6UbmYqM66ZEqNg2Yjdi6nlHI Jq+yoLWORZ3AcvA/haeIepnZrnQ/E9ozk6DF7x73ZMaq5ixrrwbzUwmzcCA5CQrsNYfS RYa9eLlKEWrVLeZguHX8JBYofA0YrsV06gqC0vR50U7jEgjg1g6ZGZNBJQjo209KCSas vVGw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wnHipvnq; 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-78548-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78548-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 dv2-20020ad44ee2000000b0068fb5f488e0si4582939qvb.80.2024.02.23.06.54.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 06:54:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-78548-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=wnHipvnq; 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-78548-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78548-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 CDF0E1C2329D for ; Fri, 23 Feb 2024 14:54:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 07939224CF; Fri, 23 Feb 2024 14:54:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="wnHipvnq" Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) (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 18EE920B02 for ; Fri, 23 Feb 2024 14:54:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708700051; cv=none; b=HpzrYggAxBhPYvmAm3/A4UNM9d+ivBi48gnF2ldUAxzDnp6t0H01is1jsdHJGCfK/80FNsE0cWAhUFkClyD1BptTEsYcB59Maa3exC5RdCjdm/KIsLJJn0K1P4kwOOb8vKR411cFLP2BtuHfWdc4gRijU0dxJUGc83b+9rPL0o8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708700051; c=relaxed/simple; bh=6Oz2SurcRGuC9x/F6hMkBx4N978V20giw8IYdnyT7Tk=; h=Message-ID:Date:MIME-Version:From:Subject:To:Cc:References: In-Reply-To:Content-Type; b=ImG3K6mnciJ0EU6Yg1o3ORs4NzIR2XZS3A4MRDC7KygcKOPqfa/cSvdEmF7N39Cu2r9WRB1ZGuKpMQ0JLKe0IwdaQ/msTqQj/crhv4rVkOOAwFe/6s3bYrJ/HWbQ4BJ3AQ7EpdsVQ7q+2VnoT7Y3Jdlf1WqP7QsGPvvGzKRgVyc= 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=wnHipvnq; arc=none smtp.client-ip=209.85.221.43 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-wr1-f43.google.com with SMTP id ffacd0b85a97d-33d90dfe73cso639291f8f.0 for ; Fri, 23 Feb 2024 06:54:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708700047; x=1709304847; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:organization:autocrypt :references:cc:to:content-language:subject:reply-to:from:user-agent :mime-version:date:message-id:from:to:cc:subject:date:message-id :reply-to; bh=cNUbkWdNlhpKbmxfuu6qZOk5j1wm/SN92RpylpPx2rA=; b=wnHipvnqhiGlpohhMTy3U8eErrjhrPXItelT6tk7gt4WhdTBF0qQJzDiKy99xQbeE3 eCEfMG2UyZALpA1u0L63ozN8PlXnMYYQ0b2KPOjD3Rf4v+yIWvf2eWT/3lMP3+1eCRSJ 7FtdXkhwlzlyFEGPbTOALnYxIlbTdn62QifwUeL2OzzBhw6TTCkxP4b8ChIxmdMpUGJ5 ynRloFqMUpF9GlkUh7YgwKKpIisLLkTpszj67MHCn5hbk/2nFoHdEyH57uIq333n3Oew 1yzlmhuuUEXQLHT+f6YBuQ0T6j0yYv6y8yEX7T+95zcLU9/LyIZKyznt+cUvAVVHNnpO 894w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708700047; x=1709304847; h=content-transfer-encoding:in-reply-to:organization:autocrypt :references:cc:to:content-language:subject:reply-to:from:user-agent :mime-version:date:message-id:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=cNUbkWdNlhpKbmxfuu6qZOk5j1wm/SN92RpylpPx2rA=; b=cJGuyDynLAWzpFDZT/WSiJLLDKlXPLL37b+23Pyv+PItOyTODgBEbuey6rPJaRN6Bf xZRnJobft0WJavl3NeRu/53ZI1fa3nXVdkG+WhsqLj+rgOkSDeK96RmnJkgW5Gcbyfc+ 9zgmbwz4CxgTZk8PWBNHDLbYWPSqIMxPKyqDL+EsxcaBg4Lryn3A8tF36Ai4Az1tBXHH 4FZXU7eE3EVpmC1/daQnU/V7IVhg8MDNp1b2CcTuexosyevizjAgkxkqiGd8lrfrB2xr rPTm2MabQshbohraaSNYaEqYd5Z79nHgXVhnCnNlMxozfHb9lpVuoORBVzV8b0qcisJG Irxg== X-Forwarded-Encrypted: i=1; AJvYcCUC8wNOcz7PnRygXZJd+rvGIdx71g9eNd79hEPv9dNLtMexHEkUFpclLUFSfWDsREXApuM87y2KhUnBy1dQIa3UNvHtUI2lVvh2SSl/ X-Gm-Message-State: AOJu0Yyd9mKwaBEfXdfGbDKXfwqYKO9sWSUbk+RvnMdm0Ffcac0sXbuM OjjFmKafve+18U9CNLOcX/f4k8Olq8dAtJlfcgJOY8DuQxS5Rocgqpubalc2lGA= X-Received: by 2002:a5d:6a90:0:b0:33d:c45:15ec with SMTP id s16-20020a5d6a90000000b0033d0c4515ecmr5104778wru.32.1708700047381; Fri, 23 Feb 2024 06:54:07 -0800 (PST) Received: from ?IPV6:2a01:e0a:982:cbb0:58e3:6b80:c446:11f4? ([2a01:e0a:982:cbb0:58e3:6b80:c446:11f4]) by smtp.gmail.com with ESMTPSA id fa15-20020a05600c518f00b0041294a1d7bcsm2314742wmb.36.2024.02.23.06.54.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 23 Feb 2024 06:54:06 -0800 (PST) Message-ID: <3b6dc98a-a13d-4958-b8b4-003d27c84f89@linaro.org> Date: Fri, 23 Feb 2024 15:54:05 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Neil Armstrong Reply-To: neil.armstrong@linaro.org Subject: Re: [PATCH 0/6] soc: qcom: pmic_glink_altmode: fix drm bridge use-after-free Content-Language: en-US, fr To: Johan Hovold , Bjorn Andersson , Andrzej Hajda , Robert Foss , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Vinod Koul Cc: Jonas Karlman , Laurent Pinchart , Jernej Skrabec , Konrad Dybcio , Kishon Vijay Abraham I , Dmitry Baryshkov , Rob Clark , Abhinav Kumar , Kuogee Hsieh , freedreno@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org References: <20240217150228.5788-1-johan+linaro@kernel.org> Autocrypt: addr=neil.armstrong@linaro.org; keydata= xsBNBE1ZBs8BCAD78xVLsXPwV/2qQx2FaO/7mhWL0Qodw8UcQJnkrWmgTFRobtTWxuRx8WWP GTjuhvbleoQ5Cxjr+v+1ARGCH46MxFP5DwauzPekwJUD5QKZlaw/bURTLmS2id5wWi3lqVH4 BVF2WzvGyyeV1o4RTCYDnZ9VLLylJ9bneEaIs/7cjCEbipGGFlfIML3sfqnIvMAxIMZrvcl9 qPV2k+KQ7q+aXavU5W+yLNn7QtXUB530Zlk/d2ETgzQ5FLYYnUDAaRl+8JUTjc0CNOTpCeik 80TZcE6f8M76Xa6yU8VcNko94Ck7iB4vj70q76P/J7kt98hklrr85/3NU3oti3nrIHmHABEB AAHNKk5laWwgQXJtc3Ryb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VaTPMyT25Od+RC1K+iOR0F54oUJvJeq7fUzbn/KdlhA8XPGzwGRy 4zcsPWvwnXgfe5tk680fEKZVwOZKIEuJC3v+/yZpQzDvGYJvbyix0lHnrCzq43WefRHI5XTT QbM0WUIBIcGmq38+OgUsMYu4NzLu7uZFAcmp6h8g Organization: Linaro Developer Services In-Reply-To: <20240217150228.5788-1-johan+linaro@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 17/02/2024 16:02, Johan Hovold wrote: > Starting with 6.8-rc1 the internal display sometimes fails to come up on > machines like the Lenovo ThinkPad X13s and the logs indicate that this > is due to a regression in the DRM subsystem [1]. > > This series fixes a race in the pmic_glink_altmode driver which was > exposed / triggered by the transparent DRM bridges rework that went into > 6.8-rc1 and that manifested itself as a bridge failing to attach and > sometimes triggering a NULL-pointer dereference. > > The intermittent hard resets that have also been reported since 6.8-rc1 > unfortunately still remains and suggests that we are dealing with two > separate regressions. There is some indication that also the hard resets > (e.g. due to register accesses to unclocked hardware) are also due to > changes in the DRM subsystem as it happens around the time that the eDP > panel and display controller would be initialised during boot (the > runtime PM rework?). This remains to be verified, however. > > Included is also a fix for a related OF node reference leak in the > aux-hpd driver found through inspection when reworking the driver. > > The use-after-free bug is triggered by a probe deferral and highlighted > some further bugs in the involved drivers, which were registering child > devices before deferring probe. This behaviour is not correct and can > both trigger probe deferral loops and potentially also further issues > with the DRM bridge implementation. > > This series can either go through the Qualcomm SoC tree (pmic_glink) or > the DRM tree. The PHY patches do not depend on the rest of the series > and could possibly be merged separately through the PHY tree. > > Whichever gets this to mainline the fastest. > > Johan > > > [1] https://lore.kernel.org/lkml/ZctVmLK4zTwcpW3A@hovoldconsulting.com/ > > > Johan Hovold (5): > drm/bridge: aux-hpd: fix OF node leaks > drm/bridge: aux-hpd: separate allocation and registration > soc: qcom: pmic_glink_altmode: fix drm bridge use-after-free > phy: qcom-qmp-combo: fix drm bridge registration > phy: qcom-qmp-combo: fix type-c switch registration > > Rob Clark (1): > soc: qcom: pmic_glink: Fix boot when QRTR=m > > drivers/gpu/drm/bridge/aux-hpd-bridge.c | 70 ++++++++++++++++++----- > drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 16 +++--- > drivers/soc/qcom/pmic_glink.c | 21 +++---- > drivers/soc/qcom/pmic_glink_altmode.c | 16 +++++- > include/drm/bridge/aux-bridge.h | 15 +++++ > 5 files changed, 102 insertions(+), 36 deletions(-) > For the serie: Acked-by: Neil Armstrong After an offline discussion, Dmitry, it's ok to push the remaining patches to drm-misc-fixes. Thanks, Neil