[ovs-dev] [PATCH] netdev-vport: Fix use-after-free error in netdev_vport_route_changed().
Ethan Jackson
ethan at nicira.com
Tue Jun 24 21:33:45 UTC 2014
Acked-by: Ethan Jackson <ethan at nicira.com>
On Tue, Jun 24, 2014 at 1:48 PM, Ben Pfaff <blp at nicira.com> wrote:
> We can't unlock the netdev's mutex after close the netdev, because closing
> the netdev might destroy the mutex.
>
> VMware-BZ: #1275187
> Signed-off-by: Ben Pfaff <blp at nicira.com>
> ---
> lib/netdev-vport.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/lib/netdev-vport.c b/lib/netdev-vport.c
> index 9fa15f5..17adf94 100644
> --- a/lib/netdev-vport.c
> +++ b/lib/netdev-vport.c
> @@ -1,5 +1,5 @@
> /*
> - * Copyright (c) 2010, 2011, 2012, 2013 Nicira, Inc.
> + * Copyright (c) 2010, 2011, 2012, 2013, 2014 Nicira, Inc.
> *
> * Licensed under the Apache License, Version 2.0 (the "License");
> * you may not use this file except in compliance with the License.
> @@ -203,8 +203,9 @@ netdev_vport_route_changed(void)
> netdev_change_seq_changed(netdev_);
> }
> }
> - netdev_close(netdev_);
> ovs_mutex_unlock(&netdev->mutex);
> +
> + netdev_close(netdev_);
> }
>
> free(vports);
> --
> 1.7.10.4
>
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev
More information about the dev
mailing list