[ovs-dev] [PATCH] veth: Do a better job cleaning up on rmmod
Justin Pettit
jpettit at nicira.com
Wed Apr 21 09:03:29 UTC 2010
This is identical to the [PATCH 2/2] message with the same description. Please ignore.
--Justin
On Apr 20, 2010, at 10:50 PM, Justin Pettit wrote:
> The veth driver doesn't clean itself up very well when removed. This
> commit destroys any outstanding veth devices and then unregisters its
> sysfs entry.
> ---
> datapath/linux-2.6/compat-2.6/veth.c | 9 +++++++++
> 1 files changed, 9 insertions(+), 0 deletions(-)
>
> diff --git a/datapath/linux-2.6/compat-2.6/veth.c b/datapath/linux-2.6/compat-2.6/veth.c
> index 66aae0b..a83e45f 100644
> --- a/datapath/linux-2.6/compat-2.6/veth.c
> +++ b/datapath/linux-2.6/compat-2.6/veth.c
> @@ -526,7 +526,16 @@ static __init int veth_init(void)
>
> static __exit void veth_exit(void)
> {
> + struct veth_priv *p, *n;
> +
> + rtnl_lock();
> + list_for_each_entry_safe(p, n, &veth_list, list) {
> + veth_dellink(p->dev);
> + }
> + rtnl_unlock();
> +
> unregister_netdevice_notifier(&veth_notifier_block);
> + veth_destroy_sysfs();
> }
>
> module_init(veth_init);
> --
> 1.7.0.3
>
>
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev_openvswitch.org
More information about the dev
mailing list