lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALnjE+ri3yy7xS5NeS+FHzby4LH--6FAXbWS73CkiBYPfVMs4A@mail.gmail.com>
Date:	Tue, 25 Aug 2015 13:54:35 -0700
From:	Pravin Shelar <pshelar@...ira.com>
To:	Jesse Gross <jesse@...ira.com>
Cc:	netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH v3 net-next 7/8] geneve: Consolidate Geneve functionality
 in single module.

On Tue, Aug 25, 2015 at 12:03 PM, Jesse Gross <jesse@...ira.com> wrote:
> On Mon, Aug 24, 2015 at 10:43 AM, Pravin B Shelar <pshelar@...ira.com> wrote:
>> 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.

geneve tunnel is added to hash table during configure time. So the
lookup does not have any dependency on device up or down state. The
Lookup and hash table updates are done under rtnl lock.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ