Re: Oops from tun module

From: Max Krasnyansky (maxk@qualcomm.com)
Date: Wed Jul 30 2003 - 16:25:49 EST


At 12:04 PM 7/29/2003, Dave O wrote:
>I added a tun/tap interface using tunctl(8) from the user-mode-linux
>project under 2.6.0-test1, which created a device tap0, owned by user 1000
>(tunctl -u 1000). In doing so, the tun module was automatically loaded,
>but showed a refcount of 0 in lsmod. I was able to successfully "rmmod
>tun", but after doing this every program that tried to open /proc/net/dev
>(including ifconfig) immediately segfaults and causes an Oops. I was able
>to modprobe tun.o back in and that restored sane behavior. I imagine the
>module should have had it's refcount incremented when the device is
>created.

TUN/TAP driver relies on the network core to do module reference counting.
It doesn't really do any cleanup in module_exit(). Module refcounting was
recently removed from the network core which apparently broke TUN/TAP
driver. btw 'misc' driver doesn't do any ref counting either.
I'll try to spend some time on it this week and fix both misc and TUN driver.

Max

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Jul 31 2003 - 22:00:47 EST