| To: | "David S. Miller" <davem@xxxxxxxxxx>, Stephen Hemminger <shemminger@xxxxxxxx> |
|---|---|
| Subject: | Re: [PATCH] tun driver use private linked list. |
| From: | Max Krasnyansky <maxk@xxxxxxxxxxxx> |
| Date: | Tue, 12 Aug 2003 09:48:50 -0700 |
| Cc: | netdev@xxxxxxxxxxx |
| In-reply-to: | <20030809011801.3258f7af.davem@redhat.com> |
| References: | <20030808113404.0e9e1e6d.shemminger@osdl.org> <200308051630.28552.bellucda@tiscali.it> <20030805090647.691daa7e.shemminger@osdl.org> <200308051910.55823.bellucda@tiscali.it> <20030807154524.4794ad45.shemminger@osdl.org> <20030807155901.49f1a424.davem@redhat.com> <20030808113404.0e9e1e6d.shemminger@osdl.org> |
| Sender: | netdev-bounce@xxxxxxxxxxx |
At 01:18 AM 8/9/2003, David S. Miller wrote:
>On Fri, 8 Aug 2003 11:34:04 -0700
>Stephen Hemminger <shemminger@xxxxxxxx> wrote:
>
>> Less grotty version, applies over earlier patch.
>> - keep a private list.
>> - fix debug format strings.
>> - drop the name entry in the private data structure since it already
>> has a pointer to netdev that has name.
>
>Applied, thanks for following up on this Stephen.
Folks,
Sorry for jumping in late.
I didn't implement cleanup logic in module_exit() because TUN module is not
supposed
to be unloaded if it has network devices, _even if those devices are down_.
TUN registers net device only when user application asks for it.
fd = open("/dev/net/tun") -> ioctl(fd, CREATE_TUN_DEV) ->
read(fd)/write(fd);
Net device must not be destroyed while fd is open.
So instead of cleaning up in tun_module_exit() we should fix misc driver to do
refcounting
for misc devices so that we could bump ref count for tun driver when
application creates
net device.
Max
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [RFT][PATCH] cleanup net/atm/br2684.c, chas williams |
|---|---|
| Next by Date: | Re: [RFT][PATCH] Convert bluetooth to dynamic net_device., Max Krasnyansky |
| Previous by Thread: | Re: [PATCH] tun driver use private linked list., David S. Miller |
| Next by Thread: | Re: [PATCH] tun driver use private linked list., Stephen Hemminger |
| Indexes: | [Date] [Thread] [Top] [All Lists] |