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  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Tue, 13 Aug 2019 22:22:56 -0400
From:   Sasha Levin <>
Cc:     Rasmus Villemoes <>,
        Willem de Bruijn <>,
        Marc Kleine-Budde <>,
        Sasha Levin <>,,
Subject: [PATCH AUTOSEL 4.9 06/33] can: dev: call netif_carrier_off() in register_candev()

From: Rasmus Villemoes <>

[ Upstream commit c63845609c4700488e5eacd6ab4d06d5d420e5ef ]

CONFIG_CAN_LEDS is deprecated. When trying to use the generic netdev
trigger as suggested, there's a small inconsistency with the link
property: The LED is on initially, stays on when the device is brought
up, and then turns off (as expected) when the device is brought down.

Make sure the LED always reflects the state of the CAN device.

Signed-off-by: Rasmus Villemoes <>
Acked-by: Willem de Bruijn <>
Signed-off-by: Marc Kleine-Budde <>
Signed-off-by: Sasha Levin <>
 drivers/net/can/dev.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/can/dev.c b/drivers/net/can/dev.c
index 214a48703a4e4..ffc5467a1ec2b 100644
--- a/drivers/net/can/dev.c
+++ b/drivers/net/can/dev.c
@@ -1095,6 +1095,8 @@ static struct rtnl_link_ops can_link_ops __read_mostly = {
 int register_candev(struct net_device *dev)
 	dev->rtnl_link_ops = &can_link_ops;
+	netif_carrier_off(dev);
 	return register_netdev(dev);

Powered by blists - more mailing lists