• Mahesh Bandewar's avatar
    ipvlan: fix dev_id creation corner case. · 019ec003
    Mahesh Bandewar authored
    In the last patch da36e13c ("ipvlan: improvise dev_id generation
    logic in IPvlan") I missed some part of Dave's suggestion and because
    of that the dev_id creation could fail in a corner case scenario. This
    would happen when more or less 64k devices have been already created and
    several have been deleted. If the devices that are still sticking around
    are the last n bits from the bitmap. So in this scenario even if lower
    bits are available, the dev_id search is so narrow that it always fails.
    
    Fixes: da36e13c ("ipvlan: improvise dev_id generation logic in IPvlan")
    CC: David Miller <davem@davemloft.org>
    CC: Eric Dumazet <edumazet@google.com>
    Signed-off-by: default avatarMahesh Bandewar <maheshb@google.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    019ec003
ipvlan_main.c 22.2 KB