lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240103102630.3770242-1-arnd@kernel.org>
Date: Wed,  3 Jan 2024 11:26:25 +0100
From: Arnd Bergmann <arnd@...nel.org>
To: "David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>,
	Paolo Abeni <pabeni@...hat.com>,
	Heiner Kallweit <hkallweit1@...il.com>
Cc: Arnd Bergmann <arnd@...db.de>,
	netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: [PATCH] r8169: fix building with CONFIG_LEDS_CLASS=m

From: Arnd Bergmann <arnd@...db.de>

When r8169 is built-in but the LED support is a loadable module, the
new code to drive the LED now causes a link failure:

ld: drivers/net/ethernet/realtek/r8169_leds.o: in function `rtl8168_init_leds':
r8169_leds.c:(.text+0x36c): undefined reference to `devm_led_classdev_register_ext'

Add a Kconfig dependency to prevent the broken configuration but still
allow having the network code built-in as long as CONFIG_LEDS_TRIGGER_NETDEV
is disabled, regardless of CONFIG_LEDS_CLASS.

Fixes: 18764b883e15 ("r8169: add support for LED's on RTL8168/RTL8101")
Signed-off-by: Arnd Bergmann <arnd@...db.de>
---
 drivers/net/ethernet/realtek/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/realtek/Kconfig b/drivers/net/ethernet/realtek/Kconfig
index 93d9df55b361..fd3f18b328de 100644
--- a/drivers/net/ethernet/realtek/Kconfig
+++ b/drivers/net/ethernet/realtek/Kconfig
@@ -98,6 +98,7 @@ config 8139_OLD_RX_RESET
 config R8169
 	tristate "Realtek 8169/8168/8101/8125 ethernet support"
 	depends on PCI
+	depends on LEDS_CLASS || !LEDS_TRIGGER_NETDEV
 	select FW_LOADER
 	select CRC32
 	select PHYLIB
-- 
2.39.2


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ