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 7FBC8606A33A for ; Mon, 30 Nov 2026 22:54:47 +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=Dt7WNODy; 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=ArZtjztO 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=qY2UJjYI1IHGgE/AyT+psleX3Q7KtMj5uzijQQ9y+tQ=; b=Dt7WNODyFh4OMi+zjMmsgB9Hns NqzWZBCVU+cFiklT2K4aGLnqLX3MHJQA839rpb3sqbsITMDzs63OOW2AenjnZFLmCEr3sFqA8nsEr Ox+6O+L5LSRERHSIJ/NdcrnxfpvXXdi31BmY5MTNjQKuuH0RjM/KvMGVXnwV9hJeJEV9dEV78DZ+u aOymWiDT5cF3VW9ANVN3aCFCCRO2fx3vs3h4Kmq43H3mUZY5Qj0PO/62JgfGMl/Oetb9SXt5OMYSP qvBPu+Dzc9h5QXVQmRpAkbuGe2jZkQIrRacFGapSMoTfkYorB7S1GAh/AsV5iUReaHHC8rn+L4TEI rFaaFSRw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYAGl-000000060n9-0AUJ; Mon, 30 Nov 2026 22:54:47 +0000 Received: from mail-dy1-x1345.google.com ([2607:f8b0:4864:20::1345]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYAGf-000000060hh-1st5 for linux-phy@lists.infradead.org; Mon, 30 Nov 2026 22:54:42 +0000 Received: by mail-dy1-x1345.google.com with SMTP id 5a478bee46e88-3854627c1c8so14209985eec.1 for ; Mon, 30 Nov 2026 14:54:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20260707; t=1796079280; x=1796684080; 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=Ogc6P0j6zaRTvkIwr3TuFwaqxUQcMZNhrzAwa06dyNA=; b=ArZtjztOhE/9IEPiokD+e9b5pvHCBcAPFWETyNbRU6rzLK0dm9exOdIaPQdoCqDKYd uubp0DCmDSoDoNBWEtQFKv3I5uCE5TMLDvwd9cPWw7zM3nT+Y61TvgfffC1dTqAvEa0b 3xBqxU8tMpxjl9XJVgz+SdcxKm9ZoUU0h1L8+EYarZDt3T40h5zbyQbMvEoFPuD4kkrV 4feMl+Xm2GJYt+H9rMC0WZK/KSSJEFRychuMUEWxJoxT97xCmuX9JAqTNpUHbL6kooPf PkHVeo2rHQ4zvgcf5jGTvzQnrak+ztet7f8N/eNYo5lRqTdygWLWujzD52E6SPGF/aJb zhFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796079280; x=1796684080; 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=Ogc6P0j6zaRTvkIwr3TuFwaqxUQcMZNhrzAwa06dyNA=; b=YV/lO3NOEHW6kFKfR5xyOiyoRs4HE8dWKsVPLr4nwb+LipuZLtHUq0bpZTsk1S64pw 4Kpy8ApEuRgJz6ADvtMFungemc9c5S89vYC8kd6bqDpUL93Tad6j6YzuWRuq/Mb0DGnC q/MFYkl+6SthovCfGL+mdoMf6cHaF+7ajCgH+6TmmzMQdGG4XeGIMxia0ERDnaw7D1xf Uzdyeo+tBjbfTAky31/7WbovGooLOHIBAebuOm0fv+QDDyPwbpiW8gRisNsR/cme6+8U ue42w/hJxyTnS4VsO1zfHxgKXxvecn0+VCiJcjLVMje4PpR6wYg7GuIsSgeqSv9zzD4X tDaQ== X-Forwarded-Encrypted: i=1; AL+hErFHF+cNs94iWl7kKBFh01IXEye88899HsnHDrH3wEyI/Wr7V9Y6v9WOks7qz9bCD9gufklJBwMNc5k=@lists.infradead.org X-Gm-Message-State: APuU4Z/W1OOmMeOR6X6T/MBeFNkZz8n98CWNWfWSmRqORqcGIPmH5TZx QFMuU+eKdSLUB+knJy7GsyeHqHmj3Gt4xDJs4BsUliyytKeJUWntnwJ+i0ZTh/4e3iLSmfH1ev0 jwfZ+5ao+0A== X-Received: from dybkz3.prod.google.com ([2002:a05:7301:1a03:b0:358:2c8e:30e3]) (user=irogers job=prod-delivery.src-stubby-dispatcher) by 2002:a05:693c:880e:20b0:386:b26b:d67a with SMTP id 5a478bee46e88-386b26be80fmr24697614eec.12.1796079280113; Mon, 30 Nov 2026 14:54:40 -0800 (PST) Date: Mon, 30 Nov 2026 14:54:20 -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-5-irogers@google.com> Subject: [PATCH 04/10] phy: eyeq5-eth: 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 , Vladimir Kondratiev , "=?UTF-8?q?Beno=C3=AEt=20Monin?=" , Gregory CLEMENT , "=?UTF-8?q?Th=C3=A9o=20Lebrun?=" , Vladimir Oltean , Luca Ceresoli , linux-mips@vger.kernel.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261130_145441_495642_DDE6CD88 X-CRM114-Status: UNSURE ( 8.73 ) 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 eq5_phy_ops, found with Clang's require_explicit_initialization attribute. Fixes: b6e33443876d ("phy: Add driver for EyeQ5 Ethernet PHY wrapper") Signed-off-by: Ian Rogers --- drivers/phy/phy-eyeq5-eth.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/phy/phy-eyeq5-eth.c b/drivers/phy/phy-eyeq5-eth.c index fae147268f5f..69c428a867c8 100644 --- a/drivers/phy/phy-eyeq5-eth.c +++ b/drivers/phy/phy-eyeq5-eth.c @@ -182,6 +182,7 @@ static const struct phy_ops eq5_phy_ops = { .power_off = eq5_phy_power_off, .set_mode = eq5_phy_set_mode, .validate = eq5_phy_validate, + .owner = THIS_MODULE, }; static struct phy *eq5_phy_xlate(struct device *dev, -- 2.56.1.839.g22a8290db9-goog -- linux-phy mailing list linux-phy@lists.infradead.org https://lists.infradead.org/mailman/listinfo/linux-phy