From: Neil Horman <nhorman@xxxxxxxxxx> As per the last commit, once a netdevice is registered, theres nothing to unregister it, even if the module is removed. That's obviously a memory leak and an easy oops vector. Fixing it isn't hard, but it requires that some additional infrastructure be put in place to handle device removal and shutdown that isn't in the driver yet. Given our short runway of time here I suggest that instead, we simply remove the module cleanup routine. This has the effect of preventing the module from being removed, so we never hit the problem. It can be restored once the device shutdown removal code is in place Signed-off-by: Neil Horman <nhorman@xxxxxxxxxx> Signed-off-by: Benjamin Romer <benjamin.romer@xxxxxxxxxx> --- drivers/staging/unisys/visornic/visornic_main.c | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/drivers/staging/unisys/visornic/visornic_main.c b/drivers/staging/unisys/visornic/visornic_main.c index 4d49937..d1aad3c 100644 --- a/drivers/staging/unisys/visornic/visornic_main.c +++ b/drivers/staging/unisys/visornic/visornic_main.c @@ -2137,27 +2137,7 @@ cleanup_debugfs: return err; } -/** - * visornic_cleanup - driver exit routine - * - * Unregister driver from the bus and free up memory. - */ -static void visornic_cleanup(void) -{ - visorbus_unregister_visor_driver(&visornic_driver); - - if (visornic_timeout_reset_workqueue) { - flush_workqueue(visornic_timeout_reset_workqueue); - destroy_workqueue(visornic_timeout_reset_workqueue); - } - debugfs_remove_recursive(visornic_debugfs_dir); - - kfree(dev_num_pool); - dev_num_pool = NULL; -} - module_init(visornic_init); -module_exit(visornic_cleanup); MODULE_AUTHOR("Unisys"); MODULE_LICENSE("GPL"); -- 2.1.4 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel