On Tue 5 August 2003 16:30, Daniele Bellucci wrote: > Hi, > can anyone tellme why MOD_*_COUNT has disappeared in 2.5.x? > without MOD_*_COUNT i get an oops everytime i try to unload tun device > driver. > > Have i missed something? > ..i don't know the whole story. This one fix the problem by adding deprecated MOD_*_COUNT ... diff -urN 1.0/drivers/net/tun.c 1.1/drivers/net/tun.c --- 1.0/drivers/net/tun.c 2003-08-05 16:22:52.000000000 +0200 +++ 1.1/drivers/net/tun.c 2003-08-05 16:39:48.000000000 +0200 @@ -419,6 +419,7 @@ kfree(dev); goto failed; } + MOD_INC_USE_COUNT; } @@ -565,6 +566,7 @@ if (!(tun->flags & TUN_PERSIST)) unregister_netdevice(tun->dev); + MOD_DEC_USE_COUNT; rtnl_unlock(); return 0; are there any workinprogress in net-layer? (concerning module usage count) what about use try_module_get in register_netdevice? -- Daniele. - : send the line "unsubscribe linux-net" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html