linux/drivers
Mahesh Bandewar da36e13cf6 ipvlan: improvise dev_id generation logic in IPvlan
The patch 009146d117 ("ipvlan: assign unique dev-id for each slave
device.") used ida_simple_get() to generate dev_ids assigned to the
slave devices. However (Eric has pointed out that) there is a shortcoming
with that approach as it always uses the first available ID. This
becomes a problem when a slave gets deleted and a new slave gets added.
The ID gets reassigned causing the new slave to get the same link-local
address. This side-effect is undesirable.

This patch adds a per-port variable that keeps track of the IDs
assigned and used as the stat-base for the IDR api. This base will be
wrapped around when it reaches the MAX (0xFFFE) value possibly on a
busy system where slaves are added and deleted routinely.

Fixes: 009146d117 ("ipvlan: assign unique dev-id for each slave device.")
Signed-off-by: Mahesh Bandewar <maheshb@google.com>
CC: Eric Dumazet <edumazet@google.com>
CC: David Miller <davem@davemloft.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-01-10 20:47:12 -05:00
..
accessibility
acpi Merge branches 'acpi-scan', 'acpi-sysfs', 'acpi-wdat' and 'acpi-tables' 2017-01-06 14:36:30 +01:00
amba
android
ata
atm drivers: atm: eni: rename macro DAUGTHER_ID to fix spelling mistake 2016-12-29 12:07:01 -05:00
auxdisplay
base PM / domains: Fix 'may be used uninitialized' build warning 2016-12-31 21:52:07 +01:00
bcma
block ktime: Cleanup ktime_set() usage 2016-12-25 17:21:22 +01:00
bluetooth
bus cpu/hotplug: Cleanup state names 2016-12-25 10:47:44 +01:00
cdrom Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
char clocksource: Use a plain u64 instead of cycle_t 2016-12-25 11:04:12 +01:00
clk One fix for a broken driver on Renesas RZ/A1 SoCs with bootloaders that don't 2017-01-06 15:35:27 -08:00
clocksource Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-12-25 14:30:04 -08:00
connector
cpufreq Merge branch 'pm-cpufreq' 2017-01-06 14:34:52 +01:00
cpuidle Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
crypto Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2016-12-27 17:51:36 -08:00
dax libnvdimm for 4.10 2016-12-18 15:49:10 -08:00
dca
devfreq PM / devfreq: exynos-bus: Fix the wrong return value 2017-01-03 00:21:45 +01:00
dio Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
dma ktime: Cleanup ktime_set() usage 2016-12-25 17:21:22 +01:00
dma-buf
edac Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
eisa
extcon
firewire
firmware PSCI fixes for v4.10 2017-01-04 16:38:39 +01:00
fmc
fpga
gpio - New Device Support 2016-12-19 08:16:26 -08:00
gpu VFIO fixes for v4.10-rc3 2017-01-06 11:19:03 -08:00
hid HID: sensor-hub: Move the memset to sensor_hub_get_feature() 2017-01-02 14:01:30 +01:00
hsi
hv clocksource: Use a plain u64 instead of cycle_t 2016-12-25 11:04:12 +01:00
hwmon hwmon: (lm90) fix temp1_max_alarm attribute 2017-01-02 10:15:28 -08:00
hwspinlock
hwtracing coresight/etm3/4x: Consolidate hotplug state space 2016-12-25 10:47:44 +01:00
i2c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
ide Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
idle
iio First round of IIO fixes for the 4.10 cycle. 2017-01-02 16:59:44 +01:00
infiniband mlx5 4K UAR 2017-01-09 17:09:31 -05:00
input ktime: Cleanup ktime_set() usage 2016-12-25 17:21:22 +01:00
iommu IOMMU Fixes for Linux v4.10-rc2 2017-01-06 10:49:36 -08:00
ipack
irqchip Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-12-25 14:30:04 -08:00
isdn Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
leds cpu/hotplug: Cleanup state names 2016-12-25 10:47:44 +01:00
lguest Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
lightnvm
macintosh Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
mailbox ktime: Cleanup ktime_set() usage 2016-12-25 17:21:22 +01:00
mcb
md Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
media ktime: Cleanup ktime_set() usage 2016-12-25 17:21:22 +01:00
memory
memstick
message Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
mfd - New Device Support 2016-12-19 08:16:26 -08:00
misc mei: move write cb to completion on credentials failures 2017-01-04 18:22:44 +01:00
mmc Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
mtd Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
net ipvlan: improvise dev_id generation logic in IPvlan 2017-01-10 20:47:12 -05:00
nfc
ntb ntb_transport: Remove unnecessary call to ntb_peer_spad_read 2016-12-23 16:11:07 -05:00
nubus Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
nvdimm libnvdimm for 4.10 2016-12-18 15:49:10 -08:00
nvme Merge branch 'nvme-4.10' of git://git.infradead.org/nvme into for-linus 2016-12-22 11:54:46 -07:00
nvmem nvmem: fix nvmem_cell_read() return type doc 2017-01-04 18:22:47 +01:00
of
oprofile Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
parisc Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
parport Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
pci ktime: Cleanup ktime_set() usage 2016-12-25 17:21:22 +01:00
pcmcia
perf cpu/hotplug: Cleanup state names 2016-12-25 10:47:44 +01:00
phy
pinctrl pinctrl: samsung: Fix the width of PINCFG_TYPE_DRV bitfields for Exynos5433 2016-12-30 14:27:42 +01:00
platform platform/x86: fujitsu-laptop: use brightness_set_blocking for LED-setting callbacks 2016-12-28 12:38:10 +02:00
pnp Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
power ktime: Cleanup ktime_set() usage 2016-12-25 17:21:22 +01:00
powercap
pps
ps3
ptp
pwm
rapidio
ras
regulator - New Device Support 2016-12-19 08:16:26 -08:00
remoteproc
reset
rpmsg
rtc ktime: Cleanup ktime_set() usage 2016-12-25 17:21:22 +01:00
s390 ktime: Cleanup ktime_set() usage 2016-12-25 17:21:22 +01:00
sbus Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
scsi Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-12-25 14:30:04 -08:00
sfi
sh
sn
soc
spi
spmi
ssb
staging Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-01-09 15:39:11 -05:00
target Merge branch 'scsi-target-for-v4.10' of git://git.kernel.org/pub/scm/linux/kernel/git/bvanassche/linux 2016-12-21 10:16:05 -08:00
tc
thermal
thunderbolt
tty Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
uio
usb USB: fix problems with duplicate endpoint addresses 2017-01-05 19:38:40 +01:00
uwb
vfio vfio-pci: Handle error from pci_iomap 2017-01-04 08:34:39 -07:00
vhost
video video: fbdev: cobalt_lcdfb: Handle return NULL error from devm_ioremap 2017-01-04 12:58:45 +01:00
virt
virtio
vlynq
vme
w1
watchdog Watchdog updates for v4.10 2016-12-24 11:27:45 -08:00
xen Merge branch 'stable/for-linus-4.10' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/swiotlb 2017-01-06 10:53:21 -08:00
zorro Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
Kconfig
Makefile