patch-2.4.21 linux-2.4.21/net/bridge/br_if.c
Next file: linux-2.4.21/net/bridge/br_ioctl.c
Previous file: linux-2.4.21/net/bluetooth/syms.c
Back to the patch index
Back to the overall index
-  Lines: 27
-  Date:
2003-06-13 07:51:39.000000000 -0700
-  Orig file: 
linux-2.4.20/net/bridge/br_if.c
-  Orig date: 
2002-11-28 15:53:15.000000000 -0800
diff -urN linux-2.4.20/net/bridge/br_if.c linux-2.4.21/net/bridge/br_if.c
@@ -143,7 +143,7 @@
 	int i;
 	struct net_bridge_port *p;
 
-	p = kmalloc(sizeof(*p), GFP_KERNEL);
+	p = kmalloc(sizeof(*p), GFP_ATOMIC);
 	if (p == NULL)
 		return p;
 
@@ -153,8 +153,6 @@
 	p->path_cost = br_initial_port_cost(dev);
 	p->priority = 0x80;
 
-	dev->br_port = p;
-
 	for (i=1;i<255;i++)
 		if (br_get_port(br, i) == NULL)
 			break;
@@ -164,6 +162,8 @@
 		return NULL;
 	}
 
+	dev->br_port = p;
+
 	p->port_no = i;
 	br_init_port(p);
 	p->state = BR_STATE_DISABLED;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)