mirror of
https://github.com/openvswitch/ovs
synced 2025-08-29 13:27:59 +00:00
datapath: Don't dereference potentially NULL vport in patch ports.
When changing patch ports we need to update any peers pointing to us. When destroying the port, this means pointing them to a NULL port. However, the new namespaces code attempted to dereference this port in order to get the namespace. The net is already passed in, so we can just use that instead. Bug #9477 Reported-by: Michael Hu <mhu@nicira.com> Signed-off-by: Jesse Gross <jesse@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
This commit is contained in:
parent
5442edb9e0
commit
c240693fc4
@ -233,7 +233,7 @@ error:
|
|||||||
|
|
||||||
static void update_peers(struct net *net, const char *name, struct vport *vport)
|
static void update_peers(struct net *net, const char *name, struct vport *vport)
|
||||||
{
|
{
|
||||||
struct hlist_head *bucket = hash_bucket(ovs_dp_get_net(vport->dp), name);
|
struct hlist_head *bucket = hash_bucket(net, name);
|
||||||
struct patch_vport *peer_vport;
|
struct patch_vport *peer_vport;
|
||||||
struct hlist_node *node;
|
struct hlist_node *node;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user