Skip to contentSkip to conversation

/proc/net/atm initialization

PATCH Berkley Shands 1 participant 1 message Dec 10, 2001

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

When ATM is enabled, and any driver is loaded with the kernel
(not as a module), the init of atm_proc_root has not been done when the driver inits. this leaves the driver putting its /proc data into /proc, not in /proc/net/atm.
This bug has existed for quite some time, and the patch has been
out on the linux-atm list for a while. Since there is no ATM or /proc entry in MAINTAINERS, the SubmittingPatches file says send it here. OK, here it is :-)

net/atm/proc.c +8 -0
diff -Naur linux-2.4.16-clean/net/atm/proc.c linux/net/atm/proc.c
@@ -547,6 +547,11 @@
 	int digits,num;
 	int error;
 
+/* atm_proc_init isn't called until the end of the startup */
+/* so make the call now instead wuarl/wuapic */
+
+	if (! atm_proc_root)
+	   atm_proc_init();		/* force /proc/net/atm to exist */
 	error = -ENOMEM;
 	digits = 0;
 	for (num = dev->number; num; num /= 10) digits++;
@@ -588,9 +593,12 @@
 	struct proc_dir_entry *devices = NULL,*pvc = NULL,*svc = NULL;
 	struct proc_dir_entry *arp = NULL,*lec = NULL,*vc = NULL;
 
+	if (atm_proc_root)
+	   return 0;		/* already made wuarl/wuapic */
 	atm_proc_root = proc_mkdir("net/atm",NULL);
 	if (!atm_proc_root)
 		return -ENOMEM;
+
 	CREATE_ENTRY(devices);
 	CREATE_ENTRY(pvc);
 	CREATE_ENTRY(svc);

berkley (WU APIC driver NIC driver)