patch-2.4.20 linux-2.4.20/net/atm/proc.c

Next file: linux-2.4.20/net/atm/resources.c
Previous file: linux-2.4.20/net/8021q/vlanproc.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.19/net/atm/proc.c linux-2.4.20/net/atm/proc.c
@@ -551,9 +551,12 @@
 	digits = 0;
 	for (num = dev->number; num; num /= 10) digits++;
 	if (!digits) digits++;
-	dev->proc_name = kmalloc(strlen(dev->type)+digits+2,GFP_KERNEL);
-	if (!dev->proc_name) goto fail1;
+
+	dev->proc_name = kmalloc(strlen(dev->type) + digits + 2, GFP_ATOMIC);
+	if (!dev->proc_name)
+		goto fail1;
 	sprintf(dev->proc_name,"%s:%d",dev->type, dev->number);
+
 	dev->proc_entry = create_proc_entry(dev->proc_name, 0, atm_proc_root);
 	if (!dev->proc_entry)
 		goto fail0;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)