Thread (29 messages) flat view 29 messages, 4 authors, 2015-08-26

Re: [PATCH v3 net-next 7/8] geneve: Consolidate Geneve functionality in single module.

From: Jesse Gross <hidden>
Date: 2015-08-25 19:03:40

On Mon, Aug 24, 2015 at 10:43 AM, Pravin B Shelar [off-list ref] wrote:
quoted hunk ↗ jump to hunk
diff --git a/drivers/net/geneve.c b/drivers/net/geneve.c
index c05bc13..8eb875d 100644
--- a/drivers/net/geneve.c
+++ b/drivers/net/geneve.c
@@ -492,36 +813,36 @@ static int geneve_configure(struct net *net, struct net_device *dev,
[...]
+       gs = geneve_find_sock(gn, geneve->dst_port);
+       if (gs) {
+               if (metadata) {
+                       if (gs->collect_md)
+                               return -EEXIST;
+                       else
+                               return -EPERM;
+               } else {
+                       if (gs->collect_md)
+                               return -EPERM;
+
+                       t = geneve_lookup(gn, htons(dst_port),
+                                         rem_addr, geneve->vni);
+                       if (t)
+                               return -EBUSY;
+               }
+       }
I like the new structure but unfortunately, I think there is a race.
If two devices are created with conflicting configurations but neither
is brought up then creation of both devices will succeed. However,
when the second one is brought up, it will silently collide with the
first.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help