From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.82.197 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796079286; b=pX45qP0adrjN1v41ylFES5JwFQXSCOyPoBCa2A4tIk8LtMveRmt3fLK6uiqWw7hPsxDV r7kL4i8MsnqCI3BIQWRt/OXhlfijqP7Zp0CtPHeruZVX5wL5orm8VdriVIg6eaDi9aKUB Ykthv6O4+3BNg6jhT4nTqaIM4mlIC3xYON8JqufkOYxhSl6fgkrPD9Rof8YhOjGcj+xEo 8Rrtc9t7NohWct8MTAYDa+XCNaK/wX8jV2X3Zkk7SqtPxclW0o+aFtCR5sZU9qXgrgWBI gQJrcwyZHlO65ev3ugtM9/C7nBY2uugvf7HDW/MUD8/pWQ6Mr3RsCJ0nWNUwPZvzgPw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796079286; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Received:Date:In-Reply-To: Mime-Version:References:X-Mailer:Message-ID:Subject:From:To:Cc: Content-Type; bh=whwBdQxUbtSh6BCjjEAI2ySLbx4fLbH1COWgd1htpEs=; b=t5Rmucih/4DSxCnlxAQKqJL2sGanw2PIlC5tWtPyWUjaOKSNi4j1lsez9Kas9apJbBl0 6gzIA8YOmJ+Ih9Mngz6MALisO93Nb5SJi38D51GzPSb3MQ/p4MKY1dNQ5o3lAwi59dW6a VnhO2FMz0T6JkxaVT3LqIANKRgwTj385RbOSJv0h/WVsvJaxWnpR3yIicEO8wtSNqcSV5 Ziej4ah5JaKVNlx4xlJ3SStZZspB1LiEhSkYbSwjTNcsVrRqx7WhwhETBBob/qJcPpIoC 5xOH+0qnxDBjc/0tk5IgHEbhizOJ3fYFqjR2r5MTfghMDG2flp+iCXilMXmKcxdbrXw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=google.com; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com; dkim=pass header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20260707 header.b="P/7yDsxD"; arc=none smtp.remote-ip=74.125.82.197 Received: from mail-dy1-f197.google.com (mail-dy1-f197.google.com [74.125.82.197]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C4082606A331 for ; Mon, 30 Nov 2026 22:54:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org C4082606A331 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20260707 header.b=P/7yDsxD Received: by mail-dy1-f197.google.com with SMTP id 5a478bee46e88-3846d5f54c1so11965366eec.1 for ; Mon, 30 Nov 2026 14:54:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20260707; t=1796079285; x=1796684085; darn=vger.kernel.org; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:from:to:cc:subject:date:message-id:reply-to :content-type; bh=whwBdQxUbtSh6BCjjEAI2ySLbx4fLbH1COWgd1htpEs=; b=P/7yDsxDs7wmYkHFaqmn0mA2RiXTLhiXhZT6sxfEykr953J57EVJf6EWdNqDm2ahwm cmXcOtOagNjRRnqEV/hEeUg15WC3jPznYpxJDoRTwbVNR4VVQAE+hjoW++/FYlN3o47F ewBJMfIpIWqq8vKq8+nvRaMLNEKvHnpwWs+hJTM9eIcTGGHIxdHIsjBcKg4FOhAS6VLn uFKT1ZnDIhv+1P7Vz1dWLa3RZV+l0F44FNuPcW6+04MsCoYcPepOL41+ginDHf6Oj5AX hTdqUBYTgFgMHS9JWO2q3lQC+g/PbM+lddKrjzjBLHlY38qEEB4LWtivhWQINiorhc0U 5wiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796079285; x=1796684085; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=whwBdQxUbtSh6BCjjEAI2ySLbx4fLbH1COWgd1htpEs=; b=ihgRlT83q4ssAZBXpDycwl4v9vOIImxB0iII+5mYGsU1+qEMHclYGGslqiyGUT4YZN J/Dt7WqETeruH0OkafPWxX6qhgKYA2Q7Xyv4jzzkBPvvTdKm20rSaMgERiYAV0yQV+Hw iKQ5XuMMzdCPVe04p7MlHLm+M0ZqlBMNUe0T0P8dx+4O4aji3R3OqjIAncgpPHGG3Pe/ uz/L0QfyGZDZd1KArxaZlHVIiC89GLVDSl+eq6h4OO03V+zrSgyb/baTEtGBEUuAwxT6 pq9eK7Axl/9nKi5sKUDnNbrZKicF4VNeJaeIJp/bbNyTG1r4HfXtsDggQweYrXQ3Zy/W 4FkA== X-Forwarded-Encrypted: i=1; AL+hErFwnEJx7sKCX4+inrnRFoRSul93a/piGdgh5xdoZLcWT1xVjW7MeRLEzh/DVJwGE69bUl6CCJPw+l6MKq5o@vger.kernel.org X-Gm-Message-State: APuU4Z9MfrSdP/0TgHqMtNXlJmgqIo1DwuKwmJEK/D1Sj3SMiwbJTA4n uuCSeVEDiawlM84vp3Mo84nM1RDpRVezBq5FcVsjG4JbBp9bUg4RmWLZ8CAfCs6KpM084GFLRz8 cpG2SLrnrQQ== X-Received: from dloo27-n2.prod.google.com ([2002:a05:7023:a5b:20b0:1ab:7a71:e7]) (user=irogers job=prod-delivery.src-stubby-dispatcher) by 2002:a05:701b:4354:b0:1b2:6cba:7f7c with SMTP id a92af1059eb24-1b5568fdafemr31794054c88.37.1796079284547; Mon, 30 Nov 2026 14:54:44 -0800 (PST) Date: Mon, 30 Nov 2026 14:54:22 -0800 In-Reply-To: <20261130225428.99361-1-irogers@google.com> X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Mime-Version: 1.0 References: <20261130225428.99361-1-irogers@google.com> X-Mailer: git-send-email 2.56.1.839.g22a8290db9-goog Message-ID: <20261130225428.99361-7-irogers@google.com> Subject: [PATCH 06/10] phy: qcom: ipq4019-usb: Set .owner = THIS_MODULE From: Ian Rogers To: Vinod Koul Cc: Neil Armstrong , Manivannan Sadhasivam , Nathan Chancellor , linux-phy@lists.infradead.org, llvm@lists.linux.dev, linux-kernel@vger.kernel.org, Ian Rogers , Robert Marko , Luka Perkov , John Crispin , linux-arm-msm@vger.kernel.org Content-Type: text/plain; charset="UTF-8" phy_get() and of_phy_get() call try_module_get(phy->ops->owner) to pin the PHY provider module while the PHY is in use, and of_phy_put() calls module_put(phy->ops->owner). Because phy->ops is const struct phy_ops *, phy_create() cannot populate ops->owner at runtime, and try_module_get(NULL) returns true without incrementing the module reference count. Set .owner = THIS_MODULE in ipq4019_usb_ss_phy_ops and ipq4019_usb_hs_phy_ops, found with Clang's require_explicit_initialization attribute. Fixes: 3c9d8f6c03a2 ("phy: add driver for Qualcomm IPQ40xx USB PHY") Signed-off-by: Ian Rogers --- drivers/phy/qualcomm/phy-qcom-ipq4019-usb.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/phy/qualcomm/phy-qcom-ipq4019-usb.c b/drivers/phy/qualcomm/phy-qcom-ipq4019-usb.c index 13ccad70e77a..afb2b10030cf 100644 --- a/drivers/phy/qualcomm/phy-qcom-ipq4019-usb.c +++ b/drivers/phy/qualcomm/phy-qcom-ipq4019-usb.c @@ -50,6 +50,7 @@ static int ipq4019_ss_phy_power_on(struct phy *_phy) static const struct phy_ops ipq4019_usb_ss_phy_ops = { .power_on = ipq4019_ss_phy_power_on, .power_off = ipq4019_ss_phy_power_off, + .owner = THIS_MODULE, }; static int ipq4019_hs_phy_power_off(struct phy *_phy) @@ -82,6 +83,7 @@ static int ipq4019_hs_phy_power_on(struct phy *_phy) static const struct phy_ops ipq4019_usb_hs_phy_ops = { .power_on = ipq4019_hs_phy_power_on, .power_off = ipq4019_hs_phy_power_off, + .owner = THIS_MODULE, }; static const struct of_device_id ipq4019_usb_phy_of_match[] = { -- 2.56.1.839.g22a8290db9-goog From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DD98C606A31A for ; Mon, 30 Nov 2026 22:55:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=iwD6jzqe; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20260707 header.b=DH2AxL3z DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:From:Subject:Message-ID: References:Mime-Version:In-Reply-To:Date:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Unsubscribe-Post:List-Owner; bh=vbfAmnWaAn6RjSxeIfsOjZ+B1EoO3AV8VN4W472FZz8=; b=iwD6jzqeiSr6GhFr3KHssMRTTP o5ZHx6h4x8OeS6GeM18Hc6L/ywUvzwb9wH0nn2pBXRz2IpodvBJc61hoVqk7r9Eilh9JTpeMsSoS1 /+CwBgTsvZyqez+oAG5ViZPcyCTrIpS21wTsnWqsrpehEiVg7bLtQ7pPQbP6B3iFzptu4u42v+yTx ElhzyKfqG2vMsfT98jXcIKcEKsasMYIdW7iR65SLRtQilAeAh5HJ3MKhjBc4KBaLnxf+PBR6cUttU SUeouxs+7CXlqQ9clLk8c7cEfVt8t7ui5zB7/r4LVX4X1rCw/XfrHiBZ/EGPYMn551AU46Br3zz7I wmmJ544g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYAH7-000000060yG-267Y; Mon, 30 Nov 2026 22:55:09 +0000 Received: from mail-dy1-x1346.google.com ([2607:f8b0:4864:20::1346]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYAGk-000000060lw-2q1u for linux-phy@lists.infradead.org; Mon, 30 Nov 2026 22:54:52 +0000 Received: by mail-dy1-x1346.google.com with SMTP id 5a478bee46e88-384c78aa0dbso13536121eec.0 for ; Mon, 30 Nov 2026 14:54:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20260707; t=1796079285; x=1796684085; darn=lists.infradead.org; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:from:to:cc:subject:date:message-id:reply-to :content-type; bh=whwBdQxUbtSh6BCjjEAI2ySLbx4fLbH1COWgd1htpEs=; b=DH2AxL3zaNoqxYpdWmvBwkZK0UzPRai/4RroVhTFoiRDZyW53y5j7XNWvAl+8XNF30 trFNjXBQyGM26SXg0PeKAMJ2mj9mI9t5zBvxd4aZ3nfeotxETCAeaPExGakwXRzqX3cv 1IxbjF7ChWaXN7xlFhrA/A86gIgcTJ3PCUkTxe0xkIiTegnaTQklfliJ51+T0R1Jd8+U O/vgamsXIc7H8hiFlnOqBdlwPlXmrxQg5nvs2gV7meRmI3TZSYdWf+1FDQix5YZJ1eB0 s4DAD/5nPGZQRqSqhri4Dh2CP8SKM31o+0vyZ15jjJnsTU5ymcaa694LZ9HFsOXGi8mW JgZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796079285; x=1796684085; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=whwBdQxUbtSh6BCjjEAI2ySLbx4fLbH1COWgd1htpEs=; b=mtULbqzjP10hK8MwlT8zneCUlbCdaTrtpxJOtGpuarr/pIiyyZ+KQocZ5vp7X5qPxH j6PHOYbPEC7EmB3+R3BjiaLCdtRx9463urP2jNM19VjMQ7GctweJoxNXgrpGEeBlHRMK kfg5iGprTWkKGZIU5WYHu2vEnV4epnnKUOVUgvKwErL6VD6Sdqcqol9qr/Hj8l9ay29w Tqf96I8JP8n5HSQmKpJ//G91fsisOrc1Tx8tbNGLLvM9qs8txZkJZlcbAJEKq8szpOHe LqHGBMzsL/EwtkCCfgt/93c8g4wdugdxHiZuTK9l3Ws99C9XYTngALfijLNIh1Ha/Xs9 q3jA== X-Forwarded-Encrypted: i=1; AL+hErHqaYFe7fCFtFLjaHlXvMEXRxwkgkGWEJEU6mwtVYZ9svfEYC3apTAbZ8LGjrj3H3rel1h9IUVnXfs=@lists.infradead.org X-Gm-Message-State: APuU4Z9W9oaNIQemjPN0zkWXyX060dIgESBPjoBM7mbC/a3qyLamL6g7 cRHN04OrdpnVkcz3jIQEZuoMXYD3BN1xJWEsu5Mxam1ylnLYcyzF7fa9FRNexMTuMbGZRrW7hmS 8JKSFimAMJw== X-Received: from dloo27-n2.prod.google.com ([2002:a05:7023:a5b:20b0:1ab:7a71:e7]) (user=irogers job=prod-delivery.src-stubby-dispatcher) by 2002:a05:701b:4354:b0:1b2:6cba:7f7c with SMTP id a92af1059eb24-1b5568fdafemr31794054c88.37.1796079284547; Mon, 30 Nov 2026 14:54:44 -0800 (PST) Date: Mon, 30 Nov 2026 14:54:22 -0800 In-Reply-To: <20261130225428.99361-1-irogers@google.com> X-Archived-By: Mime-Version: 1.0 References: <20261130225428.99361-1-irogers@google.com> X-Mailer: git-send-email 2.56.1.839.g22a8290db9-goog Message-ID: <20261130225428.99361-7-irogers@google.com> Subject: [PATCH 06/10] phy: qcom: ipq4019-usb: Set .owner = THIS_MODULE From: Ian Rogers To: Vinod Koul Cc: Neil Armstrong , Manivannan Sadhasivam , Nathan Chancellor , linux-phy@lists.infradead.org, llvm@lists.linux.dev, linux-kernel@vger.kernel.org, Ian Rogers , Robert Marko , Luka Perkov , John Crispin , linux-arm-msm@vger.kernel.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261130_145446_759552_53C8D7A3 X-CRM114-Status: UNSURE ( 9.04 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -9.5 (---------) X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-phy" X-Spam-Status: No, score=-16.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 phy_get() and of_phy_get() call try_module_get(phy->ops->owner) to pin the PHY provider module while the PHY is in use, and of_phy_put() calls module_put(phy->ops->owner). Because phy->ops is const struct phy_ops *, phy_create() cannot populate ops->owner at runtime, and try_module_get(NULL) returns true without incrementing the module reference count. Set .owner = THIS_MODULE in ipq4019_usb_ss_phy_ops and ipq4019_usb_hs_phy_ops, found with Clang's require_explicit_initialization attribute. Fixes: 3c9d8f6c03a2 ("phy: add driver for Qualcomm IPQ40xx USB PHY") Signed-off-by: Ian Rogers --- drivers/phy/qualcomm/phy-qcom-ipq4019-usb.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/phy/qualcomm/phy-qcom-ipq4019-usb.c b/drivers/phy/qualcomm/phy-qcom-ipq4019-usb.c index 13ccad70e77a..afb2b10030cf 100644 --- a/drivers/phy/qualcomm/phy-qcom-ipq4019-usb.c +++ b/drivers/phy/qualcomm/phy-qcom-ipq4019-usb.c @@ -50,6 +50,7 @@ static int ipq4019_ss_phy_power_on(struct phy *_phy) static const struct phy_ops ipq4019_usb_ss_phy_ops = { .power_on = ipq4019_ss_phy_power_on, .power_off = ipq4019_ss_phy_power_off, + .owner = THIS_MODULE, }; static int ipq4019_hs_phy_power_off(struct phy *_phy) @@ -82,6 +83,7 @@ static int ipq4019_hs_phy_power_on(struct phy *_phy) static const struct phy_ops ipq4019_usb_hs_phy_ops = { .power_on = ipq4019_hs_phy_power_on, .power_off = ipq4019_hs_phy_power_off, + .owner = THIS_MODULE, }; static const struct of_device_id ipq4019_usb_phy_of_match[] = { -- 2.56.1.839.g22a8290db9-goog -- linux-phy mailing list linux-phy@lists.infradead.org https://lists.infradead.org/mailman/listinfo/linux-phy