]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
ipvlan: fix dev_id creation corner case.
authorMahesh Bandewar <maheshb@google.com>
Fri, 13 Jan 2017 23:48:30 +0000 (15:48 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 16 Jan 2017 19:04:43 +0000 (14:04 -0500)
commit019ec0032e821a7262995af0c81b242dc7e55c9f
treeb906dbf74a54e18b08830fc37ccb45d082c25f9b
parentc634700f7eec3c0da46e299cd0a0ae8b594f9b55
ipvlan: fix dev_id creation corner case.

In the last patch da36e13cf65 ("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: da36e13cf65 ("ipvlan: improvise dev_id generation logic in IPvlan")
CC: David Miller <davem@davemloft.org>
CC: Eric Dumazet <edumazet@google.com>
Signed-off-by: Mahesh Bandewar <maheshb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ipvlan/ipvlan_main.c