[netdrvr] Fix register_netdev() races in older ISA net drivers
Šī revīzija ir iekļauta:
@@ -572,6 +572,10 @@ static int __init do_elmc_probe(struct net_device *dev)
|
||||
dev->flags&=~IFF_MULTICAST; /* Multicast doesn't work */
|
||||
#endif
|
||||
|
||||
retval = register_netdev(dev);
|
||||
if (retval)
|
||||
goto err_out;
|
||||
|
||||
return 0;
|
||||
err_out:
|
||||
mca_set_adapter_procfn(slot, NULL, NULL);
|
||||
@@ -600,12 +604,7 @@ struct net_device * __init elmc_probe(int unit)
|
||||
err = do_elmc_probe(dev);
|
||||
if (err)
|
||||
goto out;
|
||||
err = register_netdev(dev);
|
||||
if (err)
|
||||
goto out1;
|
||||
return dev;
|
||||
out1:
|
||||
cleanup_card(dev);
|
||||
out:
|
||||
free_netdev(dev);
|
||||
return ERR_PTR(err);
|
||||
@@ -1288,12 +1287,9 @@ int init_module(void)
|
||||
dev->irq=irq[this_dev];
|
||||
dev->base_addr=io[this_dev];
|
||||
if (do_elmc_probe(dev) == 0) {
|
||||
if (register_netdev(dev) == 0) {
|
||||
dev_elmc[this_dev] = dev;
|
||||
found++;
|
||||
continue;
|
||||
}
|
||||
cleanup_card(dev);
|
||||
dev_elmc[this_dev] = dev;
|
||||
found++;
|
||||
continue;
|
||||
}
|
||||
free_netdev(dev);
|
||||
if (io[this_dev]==0)
|
||||
|
Atsaukties uz šo jaunā problēmā
Block a user