android_kernel_sony_sdm845/drivers
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Taehee Yoo c368df30c8 bonding: fix unexpected IFF_BONDING bit unset
[ Upstream commit 65de65d9033750d2cf1b336c9d6e9da3a8b5cc6e ]

The IFF_BONDING means bonding master or bonding slave device.
->ndo_add_slave() sets IFF_BONDING flag and ->ndo_del_slave() unsets
IFF_BONDING flag.

bond0<--bond1

Both bond0 and bond1 are bonding device and these should keep having
IFF_BONDING flag until they are removed.
But bond1 would lose IFF_BONDING at ->ndo_del_slave() because that routine
do not check whether the slave device is the bonding type or not.
This patch adds the interface type check routine before removing
IFF_BONDING flag.

Test commands:
    ip link add bond0 type bond
    ip link add bond1 type bond
    ip link set bond1 master bond0
    ip link set bond1 nomaster
    ip link del bond1 type bond
    ip link add bond1 type bond

Splat looks like:
[  226.665555] proc_dir_entry 'bonding/bond1' already registered
[  226.666440] WARNING: CPU: 0 PID: 737 at fs/proc/generic.c:361 proc_register+0x2a9/0x3e0
[  226.667571] Modules linked in: bonding af_packet sch_fq_codel ip_tables x_tables unix
[  226.668662] CPU: 0 PID: 737 Comm: ip Not tainted 5.4.0-rc3+ #96
[  226.669508] Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006
[  226.670652] RIP: 0010:proc_register+0x2a9/0x3e0
[  226.671612] Code: 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 39 01 00 00 48 8b 04 24 48 89 ea 48 c7 c7 a0 0b 14 9f 48 8b b0 e
0 00 00 00 e8 07 e7 88 ff <0f> 0b 48 c7 c7 40 2d a5 9f e8 59 d6 23 01 48 8b 4c 24 10 48 b8 00
[  226.675007] RSP: 0018:ffff888050e17078 EFLAGS: 00010282
[  226.675761] RAX: dffffc0000000008 RBX: ffff88805fdd0f10 RCX: ffffffff9dd344e2
[  226.676757] RDX: 0000000000000001 RSI: 0000000000000008 RDI: ffff88806c9f6b8c
[  226.677751] RBP: ffff8880507160f3 R08: ffffed100d940019 R09: ffffed100d940019
[  226.678761] R10: 0000000000000001 R11: ffffed100d940018 R12: ffff888050716008
[  226.679757] R13: ffff8880507160f2 R14: dffffc0000000000 R15: ffffed100a0e2c1e
[  226.680758] FS:  00007fdc217cc0c0(0000) GS:ffff88806c800000(0000) knlGS:0000000000000000
[  226.681886] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  226.682719] CR2: 00007f49313424d0 CR3: 0000000050e46001 CR4: 00000000000606f0
[  226.683727] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[  226.684725] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[  226.685681] Call Trace:
[  226.687089]  proc_create_seq_private+0xb3/0xf0
[  226.687778]  bond_create_proc_entry+0x1b3/0x3f0 [bonding]
[  226.691458]  bond_netdev_event+0x433/0x970 [bonding]
[  226.692139]  ? __module_text_address+0x13/0x140
[  226.692779]  notifier_call_chain+0x90/0x160
[  226.693401]  register_netdevice+0x9b3/0xd80
[  226.694010]  ? alloc_netdev_mqs+0x854/0xc10
[  226.694629]  ? netdev_change_features+0xa0/0xa0
[  226.695278]  ? rtnl_create_link+0x2ed/0xad0
[  226.695849]  bond_newlink+0x2a/0x60 [bonding]
[  226.696422]  __rtnl_newlink+0xb9f/0x11b0
[  226.696968]  ? rtnl_link_unregister+0x220/0x220
[ ... ]

Fixes: 0b680e7537 ("[PATCH] bonding: Add priv_flag to avoid event mishandling")
Signed-off-by: Taehee Yoo <ap420073@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-11-12 19:15:58 +01:00
..
accessibility
acpi ACPI / PCI: fix acpi_pci_irq_enable() memory leak 2019-10-05 12:30:26 +02:00
amba
android ANDROID: binder: synchronize_rcu() when using POLLFREE. 2019-10-07 18:53:19 +02:00
ata libata: add SG safety checks in SFF pio transfers 2019-09-06 10:19:35 +02:00
atm Kconfig: Fix the reference to the IDT77105 Phy driver in the description of ATM_NICSTAR_USE_IDT77105 2019-09-21 07:14:13 +02:00
auxdisplay
base cpufreq: Avoid cpufreq_suspend() deadlock on system shutdown 2019-10-29 09:15:25 +01:00
bcma
block loop: Add LOOP_SET_DIRECT_IO to compat ioctl 2019-10-29 09:15:09 +01:00
bluetooth Bluetooth: btrtl: Additional Realtek 8822CE Bluetooth devices 2019-10-05 12:30:12 +02:00
bus bus: arm-cci: remove unnecessary unreachable() 2018-12-05 19:42:41 +01:00
cdrom cdrom: Fix race condition in cdrom_sysctl_register 2019-04-05 22:29:12 +02:00
char ipmi_si: Only schedule continuously in the thread in maintenance mode 2019-10-07 18:53:10 +02:00
clk clk: at91: select parent if main oscillator or bypass is enabled 2019-10-07 18:53:14 +02:00
clocksource clocksource/drivers/exynos_mct: Increase priority over ARM arch timer 2019-08-04 09:33:22 +02:00
connector
cpufreq cpufreq: Avoid cpufreq_suspend() deadlock on system shutdown 2019-10-29 09:15:25 +01:00
cpuidle cpuidle: big.LITTLE: fix refcount leak 2019-02-12 19:44:55 +01:00
crypto crypto: caam - fix concurrency issue in givencrypt descriptor 2019-10-17 13:42:19 -07:00
dax
dca
devfreq PM / devfreq: passive: fix compiler warning 2019-10-05 12:30:29 +02:00
dio
dma dmaengine: xilinx_dma: Fix control reg update in vdma_channel_set_config 2019-11-12 19:15:54 +01:00
dma-buf
edac EDAC/altera: Use the proper type for the IRQ status bits 2019-10-05 12:30:20 +02:00
eisa
extcon extcon: arizona: Disable mic detect if running when driver is removed 2019-05-31 06:48:26 -07:00
firewire
firmware efi/cper: Fix endianness of PCIe class code 2019-11-06 12:18:09 +01:00
fmc
fpga
gpio gpio: max77620: Use correct unit for debounce times 2019-11-06 12:18:07 +01:00
gpu drm/radeon: fix si_enable_smc_cac() failed issue 2019-11-12 19:15:44 +01:00
hid HID: intel-ish-hid: fix wrong error handling in ishtp_cl_alloc_tx_ring() 2019-11-12 19:15:55 +01:00
hsi
hv Drivers: hv: vmbus: Return -EINVAL for the sys files for unopened channels 2018-12-29 13:40:15 +01:00
hwmon hwmon: (acpi_power_meter) Change log level for 'unsafe software power cap' 2019-10-05 12:30:26 +02:00
hwspinlock
hwtracing coresight: etm4x: Use explicit barriers on enable/disable 2019-10-17 13:42:20 -07:00
i2c i2c: riic: Clear NACK in tend isr 2019-10-05 12:30:36 +02:00
ide ide: pmac: add of_node_put() 2018-12-21 14:11:37 +01:00
idle x86/cpu: Sanitize FAM6_ATOM naming 2019-05-14 19:19:34 +02:00
iio iio: imu: adis16480: make sure provided frequency is positive 2019-11-12 19:15:45 +01:00
infiniband RDMA/iwcm: Fix a lock inversion issue 2019-11-06 12:18:07 +01:00
input Input: da9063 - fix capability and drop KEY_SLEEP 2019-10-29 09:15:20 +01:00
iommu iommu/amd: Silence warnings under memory pressure 2019-10-05 12:30:25 +02:00
ipack
irqchip irqchip/gic-v3-its: Fix LPI release for Multi-MSI devices 2019-10-05 12:30:10 +02:00
isdn mISDN: enforce CAP_NET_RAW for raw sockets 2019-10-05 12:30:14 +02:00
leds leds: leds-lp5562 allow firmware files up to the maximum length 2019-10-05 12:30:17 +02:00
lguest
lightnvm
macintosh macintosh/rack-meter: Convert cputime64_t use to u64 2018-10-20 09:51:32 +02:00
mailbox mailbox: handle failed named mailbox channel request 2019-08-04 09:33:41 +02:00
mcb
md dm: Use kzalloc for all structs with embedded biosets/mempools 2019-11-06 12:18:01 +01:00
media media: stkwebcam: fix runtime PM after driver unbind 2019-10-17 13:42:46 -07:00
memory memory: tegra: Fix integer overflow on tick value calculation 2019-05-25 18:26:49 +02:00
memstick memstick: jmb38x_ms: Fix an error handling path in 'jmb38x_ms_probe()' 2019-10-29 09:15:25 +01:00
message
mfd mfd: intel-lpss: Remove D3cold delay 2019-10-07 18:53:16 +02:00
misc VMCI: Release resource if the work is already queued 2019-09-06 10:19:52 +02:00
mmc mmc: sdhci: Fix incorrect switch to HS mode 2019-10-05 12:30:27 +02:00
mtd mtd: cfi_cmdset_0002: Use chip_good() to retry in do_write_oneword() 2019-10-05 12:30:07 +02:00
net bonding: fix unexpected IFF_BONDING bit unset 2019-11-12 19:15:58 +01:00
nfc NFC: st21nfca: fix double free 2019-11-12 19:15:40 +01:00
ntb
nubus
nvdimm libnvdimm/pfn: fix fsdax-mode namespace info-block zero-fields 2019-08-04 09:33:29 +02:00
nvme nvmet: fix data units read and written counters in SMART log 2019-10-05 12:30:25 +02:00
nvmem nvmem: Use the same permissions for eeprom as for nvmem 2019-09-21 07:14:08 +02:00
of of: unittest: fix memory leak in unittest_data_add 2019-11-10 11:23:19 +01:00
oprofile
parisc parisc: Disable HP HSC-PCI Cards to prevent kernel crash 2019-10-05 12:30:31 +02:00
parport parport: Fix mem leak in parport_register_dev_model 2019-07-10 09:55:29 +02:00
pci PCI: tegra: Enable Relaxed Ordering only for Tegra20 & Tegra30 2019-11-12 19:15:54 +01:00
pcmcia pcmcia: Implement CLKRUN protocol disabling for Ricoh bridges 2018-11-13 11:16:46 -08:00
perf drivers/perf: arm_pmu: Fix failure path in PM notifier 2019-08-06 18:29:41 +02:00
phy phy: renesas: rcar-gen2: Fix memory leak at error paths 2019-08-04 09:33:37 +02:00
pinctrl pinctrl: ns2: Fix off by one bugs in ns2_pinmux_enable() 2019-11-10 11:23:12 +01:00
platform platform/x86: intel_pmc_ipc: adding error handling 2019-06-22 08:17:16 +02:00
pnp
power power: supply: sysfs: ratelimit property read error message 2019-10-05 12:30:09 +02:00
powercap x86/cpu: Sanitize FAM6_ATOM naming 2019-05-14 19:19:34 +02:00
pps drivers/pps/pps.c: clear offset flags in PPS_SETPARAMS ioctl 2019-08-04 09:33:45 +02:00
ps3
ptp ptp: check gettime64 return code in PTP_SYS_OFFSET ioctl 2019-02-12 19:44:52 +01:00
pwm pwm: Fix deadlock warning when removing PWM device 2019-06-22 08:17:17 +02:00
rapidio drivers/rapidio/devices/rio_mport_cdev.c: NUL terminate some strings 2019-08-06 18:29:38 +02:00
ras
regulator regulator: pfuze100-regulator: Variable "val" in pfuze100_regulator_probe() could be uninitialized 2019-11-10 11:23:09 +01:00
remoteproc
reset reset: make device_reset_optional() really optional 2018-12-08 13:05:08 +01:00
rpmsg rpmsg: smd: fix memory leak on channel create 2018-11-13 11:17:03 -08:00
rtc rtc: pcf8523: set xtal load capacitance from DT 2019-11-06 12:18:04 +01:00
s390 scsi: zfcp: fix reaction on bit error threshold notification 2019-10-29 09:15:23 +01:00
sbus drivers/sbus/char: add of_node_put() 2018-12-21 14:11:36 +01:00
scsi scsi: lpfc: Honor module parameter lpfc_use_adisc 2019-11-12 19:15:57 +01:00
sfi
sh
sn
soc soc: mediatek: pwrap: Zero initialize rdata in pwrap_init_cipher 2019-06-22 08:17:15 +02:00
spi spi: bcm2835aux: fix corruptions for longer spi transfers 2019-09-10 10:31:03 +01:00
spmi
ssb ssb: Fix possible NULL pointer dereference in ssb_host_pcmcia_exit 2019-05-31 06:48:12 -07:00
staging staging: rtl8188eu: fix null dereference when kzalloc fails 2019-11-06 12:18:06 +01:00
target scsi: target: core: Do not overwrite CDB byte 1 2019-11-10 11:23:18 +01:00
tc TC: Set DMA masks for devices 2018-11-13 11:17:02 -08:00
thermal thermal: Fix use-after-free when unregistering thermal zone device 2019-10-17 13:42:12 -07:00
thunderbolt thunderbolt: Use 32-bit writes when writing ring producer/consumer 2019-11-06 12:18:14 +01:00
tty serial: mctrl_gpio: Check for NULL pointer 2019-11-06 12:18:08 +01:00
uio uio: Fix an Oops on load 2018-11-27 16:09:41 +01:00
usb drivers: usb: usbip: Add missing break statement to switch 2019-11-12 19:15:53 +01:00
uwb uwb: hwa-rc: fix memory leak at probe 2018-10-03 17:01:42 -07:00
vfio vfio_pci: Restore original state on release 2019-10-07 18:53:12 +02:00
vhost vhost: make sure log_num < in_num 2019-09-16 08:19:34 +02:00
video video: ssd1307fb: Start page range at page_offset 2019-10-07 18:53:09 +02:00
virt drivers/virt/fsl_hypervisor.c: prevent integer overflow in ioctl 2019-05-16 19:43:47 +02:00
virtio virtio: Honour 'may_reduce_num' in vring_create_virtqueue 2019-04-17 08:36:47 +02:00
vlynq
vme
w1 w1: fix the resume command API 2019-05-31 06:48:15 -07:00
watchdog watchdog: imx2_wdt: fix min() calculation in imx2_wdt_set_timeout 2019-10-17 13:42:07 -07:00
xen xen/pci: reserve MCFG areas earlier 2019-10-17 13:42:10 -07:00
zorro
Kconfig
Makefile