patch-2.3.4 linux/drivers/net/strip.c
Next file: linux/drivers/net/sunhme.c
Previous file: linux/drivers/net/smc-ultra.c
Back to the patch index
Back to the overall index
- Lines: 24
- Date:
Tue May 25 13:06:34 1999
- Orig file:
v2.3.3/linux/drivers/net/strip.c
- Orig date:
Sun Nov 8 13:48:06 1998
diff -u --recursive --new-file v2.3.3/linux/drivers/net/strip.c linux/drivers/net/strip.c
@@ -2027,7 +2027,9 @@
!memcmp(strip_info->dev.dev_addr, zero_address.c, sizeof(zero_address)) &&
memcmp(&strip_info->true_dev_addr, zero_address.c, sizeof(zero_address)))
{
- struct device *dev = dev_base;
+ struct device *dev;
+ read_lock_bh(&dev_base_lock);
+ dev = dev_base;
while (dev)
{
if (dev->type == strip_info->dev.type &&
@@ -2035,10 +2037,12 @@
{
printk(KERN_INFO "%s: Transferred packet ownership to %s.\n",
strip_info->dev.name, dev->name);
+ read_unlock_bh(&dev_base_lock);
return(dev);
}
dev = dev->next;
}
+ read_unlock_bh(&dev_base_lock);
}
return(&strip_info->dev);
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)