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  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, 26 Aug 2008 11:18:22 -0300
From:	Breno Leitao <>
CC:	netdev <>, Lorandi <>
Subject: [PATCH 1/1 net-next]: s2io: Fix log messages using dev->name

s2io driver is printing dev->name before its assignment (by
dev_alloc_name()), so "eth%d" is printed instead of "eth0", "eth1", etc.
Here is an example gotten from dmesg: 

eth%d: Enabling MSIX failed
eth%d: MSI-X requested but failed to enable

This patch calls dev_alloc_name() earlier, before any message being
printed, hence dev->name is translated from "eth%d" to "eth0", for
example, and all those prints become correct. 

Signed-off-by: Breno Leitão <>

diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c
index a2b0730..42a860d 100644
--- a/drivers/net/s2io.c
+++ b/drivers/net/s2io.c
@@ -7796,6 +7796,10 @@ s2io_init_nic(struct pci_dev *pdev, const struct pci_device_id *pre)
 		return -ENODEV;
+	ret = dev_alloc_name(dev, dev->name);
+	if (ret < 0)
+		goto dev_alloc_failed;
 	pci_set_drvdata(pdev, dev);
 	SET_NETDEV_DEV(dev, &pdev->dev);
@@ -8223,6 +8227,7 @@ s2io_init_nic(struct pci_dev *pdev, const struct pci_device_id *pre)
+      dev_alloc_failed:
 	pci_set_drvdata(pdev, NULL);
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to
More majordomo info at

Powered by blists - more mailing lists