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 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=1796079281; b=mvJcjSgBBRUbsadIl68XfRYSt/C4NwjerMxxv/L7MxJjW1gNPxXJP1uXQx0FU9cGsiy9 lAUX9JB+GhSWU+eoJn28tf4qh/2IdKhikvqh/vWkov9uzH31f3c9o7PxuLzgPpr0K45Ld Eap8K5p3WmvUQYCN9FDiYynyMtISS1/qGxl23waooN8GNnsUambxuQH0/poCOoKFnjdyq p1uQC3bT8ivLzFE62ehsdb6oBBWEujrhyKqAYp/u02XqaR3HExPt+LEa00Zm5sAJPgW9l /8fqWovHuXN2GNFu8DlgXvpA+FGcF+QWxIVIig/mWzRoghiMvJGA9bslIF6+ygN2NbQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796079281; 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=Ogc6P0j6zaRTvkIwr3TuFwaqxUQcMZNhrzAwa06dyNA=; b=bMO61vjMRh1cK64ZzEKJoDJZb3q+XCW/9S/FCZjlL+lyn+skxNb47ffFvmQi4BjmyJ5V LFvODz2RddMV19cEXKSfAS59gGwiJ4NL8a8XOb6ViZ/MFVBeG/YAm3IXT69MJnoffYcX9 fbZ2dlc0CBLhIh5ornQJBDCNcX0gvrSGbhSy+zdPpQtzMeIc6tuO+pU212KWcBSJoto76 hwwPs3owDjxfZUbD8uzaqBEuJyFobXSd55f/5vE9VQR4uRiWvdVqXZuS9MnOaRjOSC5VE o5iCmOrcc4WmasdRYPbHRNQtIncfbXL5Hdu91GA78VBwNoLmjCN7Ud5ywjQmPuWT2UQ== 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=Tn6lQ7BJ; 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 4E5EF606A31A for ; Mon, 30 Nov 2026 22:54:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 4E5EF606A31A 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=Tn6lQ7BJ Received: by mail-dy1-f197.google.com with SMTP id 5a478bee46e88-3854627c1c8so14209992eec.1 for ; Mon, 30 Nov 2026 14:54:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20260707; t=1796079280; x=1796684080; 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=Ogc6P0j6zaRTvkIwr3TuFwaqxUQcMZNhrzAwa06dyNA=; b=Tn6lQ7BJnT9ejAhjj1aHMWrRkGZGHo+o8JR/mFfm9Jtb2Zg9YpP3xn3tTMOmC98eA6 mTTpQwu2p8VkpVp89dEX2A2zI95HB+XZNq4MaFUX0EJ++nG4V5ahBY4fsEIttHPtwRz0 ro7c/Y3nm3VAik+Sr8eSyJF8OG98TcH4pTRM3roawiXuzglXSs4cT4gA+IGtfcydQ4lb D8hqesMgCVnfZL8H2vuHuivQdqvOsAVO5uxlXmTqwZOHxtKRBny2+yUFSJ+86Ijk3Oum ckn7BuYholRCOLUHevr/edFuzs7bpjWAJMLimUr7AWZP4bbSwsc1nlEo0zjYjaBq86b2 2wbA== 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=hzUjP8O6NsUgRXl9CG0t98IG88nvHSroWX9bxH6eQU8+vwl1QeRGmgqR+DKOmNwcnI sfrdrQ/SeIF15HfcBAf8n2oEkKIheglIPoyu4pLyZNlhLjoYuxEh9PRNn0liP5xWQTNw e4TVIjtDByPD+H75lqoSlJeIMTxiLVVzTT4RJ5jL9QcLpOQ4jZ1hN4zt9+KHNxc+OupS 5LIcbrt20FRqZ4ZS9A/09fXEv6YpzRTuIOM12J/3yQU1zLEooqRXPF7xGLwkotMCzcA2 E02UnnU2TR1kNC/LCVMOQJCp/hmu0D7b/bdnr4TlS0mgqW6OrjRE12RAjSAHG8286uLz 06/w== X-Forwarded-Encrypted: i=1; AL+hErFpxUpPLJx6IqlrY2W1CY6zLE6qFXOod13lyS7t766FBF+66oq1dYZEF+u7TbGKKwzT+DfRddaob02j@vger.kernel.org X-Gm-Message-State: APuU4Z/2UBGa5+EN1M3m6DFcE3QkA22o2dz8EkZDqrsnotb24ZuZaKo+ vXWSdPMFxP/vFf2cJL1Tmd4znTeyPwFwyMqHaKl6/E4JrdBQe3v0gmGQWIDWKbztogyEOKgZLOS rx+LbwMqXWQ== 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-Mailing-List: linux-mips@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-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 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 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