summaryrefslogtreecommitdiffstats
path: root/drivers/net/strip.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1999-06-17 13:25:08 +0000
committerRalf Baechle <ralf@linux-mips.org>1999-06-17 13:25:08 +0000
commit59223edaa18759982db0a8aced0e77457d10c68e (patch)
tree89354903b01fa0a447bffeefe00df3044495db2e /drivers/net/strip.c
parentdb7d4daea91e105e3859cf461d7e53b9b77454b2 (diff)
Merge with Linux 2.3.6. Sorry, this isn't tested on silicon, I don't
have a MIPS box at hand.
Diffstat (limited to 'drivers/net/strip.c')
-rw-r--r--drivers/net/strip.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/strip.c b/drivers/net/strip.c
index 89b4d7154..32c208a8f 100644
--- a/drivers/net/strip.c
+++ b/drivers/net/strip.c
@@ -2028,7 +2028,9 @@ static struct device *get_strip_dev(struct strip *strip_info)
!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 &&
@@ -2036,10 +2038,12 @@ static struct device *get_strip_dev(struct strip *strip_info)
{
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);
}