| To: | greearb@xxxxxxxxxxxxxxx (Ben Greear) |
|---|---|
| Subject: | Re: Question on net_device->refcnt && unregister_netdevice. |
| From: | kuznet@xxxxxxxxxxxxx |
| Date: | Sun, 13 Feb 2000 21:58:20 +0300 (MSK) |
| Cc: | netdev@xxxxxxxxxxx |
| In-reply-to: | <38A7021B.B8EF42AF@xxxxxxxxxxxxxxx> from "Ben Greear" at Feb 13, 0 12:12:28 pm |
| Sender: | owner-netdev@xxxxxxxxxxx |
Hello! > I think I found most of them. The problem was that I found devices > by their name quite often: dev_get_by_name(), and never explicitly > released them. OK! Actually, it you make this from dev->ioctl, dev->open or dev->close and do not save pointer to device, you may use __dev_get_by_*(), it does not increase refcnt. (device list is not protected by semaphore, while you sit in these routines). > Does this also cause problems in the 2.2 kernels? No. 2.2 did not have refcnt. The problem really existed, but it was masked, because probability of reference to already killed device is very low. In 2.3 it is real problem, because accounting itself needs reference to dead memory area. Alexey |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Why is the tulip.c in the 2.3 kernels older than the 2.2.14?, Ben Greear |
|---|---|
| Next by Date: | Resend: Updated tulip.c driver available for 2.3.42+ kernels., Ben Greear |
| Previous by Thread: | Re: Question on net_device->refcnt && unregister_netdevice., Ben Greear |
| Next by Thread: | sin6_scope_id patch for linux-2.3.44, 吉藤英明 |
| Indexes: | [Date] [Thread] [Top] [All Lists] |