WSL2-Linux-Kernel/drivers
David Daney 65c66af660 net: thunderx: Fix broken of_node_put() code.
commit b7d3e3d3d2 ("net: thunderx: Don't leak phy device references
on -EPROBE_DEFER condition.") incorrectly moved the call to
of_node_put() outside of the loop.  Under normal loop exit, the node
has already had of_node_put() called, so the extra call results in:

[    8.228020] ERROR: Bad of_node_put() on /soc@0/pci@848000000000/mrml-bridge0@1,0/bgx0/xlaui00
[    8.239433] CPU: 16 PID: 608 Comm: systemd-udevd Not tainted 4.6.0-rc1-numa+ #157
[    8.247380] Hardware name: www.cavium.com EBB8800/EBB8800, BIOS 0.3 Mar  2 2016
[    8.273541] Call trace:
[    8.273550] [<fffffc0008097364>] dump_backtrace+0x0/0x210
[    8.273557] [<fffffc0008097598>] show_stack+0x24/0x2c
[    8.273560] [<fffffc0008399ed0>] dump_stack+0x8c/0xb4
[    8.273566] [<fffffc00085aa828>] of_node_release+0xa8/0xac
[    8.273570] [<fffffc000839cad8>] kobject_cleanup+0x8c/0x194
[    8.273573] [<fffffc000839c97c>] kobject_put+0x44/0x6c
[    8.273576] [<fffffc00085a9ab0>] of_node_put+0x24/0x30
[    8.273587] [<fffffc0000bd0f74>] bgx_probe+0x17c/0xcd8 [thunder_bgx]
[    8.273591] [<fffffc00083ed220>] pci_device_probe+0xa0/0x114
[    8.273596] [<fffffc0008473fbc>] driver_probe_device+0x178/0x418
[    8.273599] [<fffffc000847435c>] __driver_attach+0x100/0x118
[    8.273602] [<fffffc0008471b58>] bus_for_each_dev+0x6c/0xac
[    8.273605] [<fffffc0008473884>] driver_attach+0x30/0x38
[    8.273608] [<fffffc00084732f4>] bus_add_driver+0x1f8/0x29c
[    8.273611] [<fffffc0008475028>] driver_register+0x70/0x110
[    8.273617] [<fffffc00083ebf08>] __pci_register_driver+0x60/0x6c
[    8.273623] [<fffffc0000bf0040>] bgx_init_module+0x40/0x48 [thunder_bgx]
[    8.273626] [<fffffc0008090d04>] do_one_initcall+0xcc/0x1c0
[    8.273631] [<fffffc0008198abc>] do_init_module+0x68/0x1c8
[    8.273635] [<fffffc0008125668>] load_module+0xf44/0x11f4
[    8.273638] [<fffffc0008125b64>] SyS_finit_module+0xb8/0xe0
[    8.273641] [<fffffc0008093b30>] el0_svc_naked+0x24/0x28

Go back to the previous (correct) code that only did the extra
of_node_put() call on early exit from the loop.

Signed-off-by: David Daney <david.daney@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-04-13 23:06:31 -04:00
..
accessibility
acpi Merge branch 'acpi-processor' 2016-04-02 01:17:36 +02:00
amba
android
ata
atm
auxdisplay
base PM / wakeirq: fix wakeirq setting after wakup re-configuration from sysfs 2016-04-07 22:23:47 +02:00
bcma
block Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client 2016-04-07 16:34:26 -07:00
bluetooth
bus
cdrom
char Revert "ppdev: use new parport device model" 2016-03-25 09:02:13 -07:00
clk clk: qcom: ipq4019: add some fixed clocks for ddrppl and fepll 2016-03-29 16:31:16 -07:00
clocksource
connector
cpufreq Merge branches 'pm-cpufreq', 'pm-cpuidle' and 'acpi-cppc' 2016-04-08 21:46:05 +02:00
cpuidle
crypto
dca
devfreq
dio
dma asm-generic changes for 4.6 2016-03-24 23:13:48 -07:00
dma-buf
edac
eisa
extcon
firewire IEEE 1394 subsystem patch: 2016-03-25 08:52:25 -07:00
firmware firmware: qemu_fw_cfg.c: hold ACPI global lock during device access 2016-04-07 15:16:40 +03:00
fmc
fpga
gpio gpio: xgene: Prevent NULL pointer dereference 2016-03-30 10:39:39 +02:00
gpu Merge branch 'drm-fixes-4.6' of git://people.freedesktop.org/~agd5f/linux into drm-fixes 2016-04-07 07:08:46 +10:00
hid
hsi
hv
hwmon hwmon: (max1111) Return -ENODEV from max1111_read_channel if not instantiated 2016-03-27 10:37:48 -07:00
hwspinlock
hwtracing
i2c
ide
idle intel_idle: Add KBL support 2016-04-07 22:11:08 +02:00
iio Second set of IIO fixes for the 4.6 cycle. 2016-04-04 13:45:10 -07:00
infiniband Revert "ib_srpt: Convert to percpu_ida tag allocation" 2016-04-07 18:16:20 -07:00
input Merge branch 'akpm' (patches from Andrew) 2016-03-25 16:59:11 -07:00
iommu iommu/vt-d: Silence an uninitialized variable warning 2016-04-07 14:51:47 +02:00
ipack
irqchip
isdn mISDN: Fixing missing validation in base_sock_bind() 2016-04-13 23:00:50 -04:00
leds
lguest
lightnvm
macintosh
mailbox Merge branches 'pm-cpufreq', 'pm-cpuidle' and 'acpi-cppc' 2016-04-08 21:46:05 +02:00
mcb
md Merge tag 'md/4.6-rc2-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md 2016-04-09 11:23:27 -07:00
media media fixes for v4.6-rc2 2016-04-05 06:47:50 -07:00
memory MTD updates for v4.6 2016-03-24 19:57:15 -07:00
memstick drivers/memstick/host/r592.c: avoid gcc-6 warning 2016-03-25 16:37:42 -07:00
message
mfd
misc mm, fs: get rid of PAGE_CACHE_* and page_cache_{get,release} macros 2016-04-04 10:41:08 -07:00
mmc mm, fs: get rid of PAGE_CACHE_* and page_cache_{get,release} macros 2016-04-04 10:41:08 -07:00
mtd mm, fs: get rid of PAGE_CACHE_* and page_cache_{get,release} macros 2016-04-04 10:41:08 -07:00
net net: thunderx: Fix broken of_node_put() code. 2016-04-13 23:06:31 -04:00
nfc
ntb NTB: Remove _addr functions from ntb_hw_amd 2016-03-26 11:44:33 -04:00
nubus
nvdimm mm, fs: get rid of PAGE_CACHE_* and page_cache_{get,release} macros 2016-04-04 10:41:08 -07:00
nvme
nvmem
of
oprofile mm, fs: get rid of PAGE_CACHE_* and page_cache_{get,release} macros 2016-04-04 10:41:08 -07:00
parisc
parport
pci
pcmcia pcmcia: db1xxx_ss: fix last irq_to_gpio user 2016-03-29 22:48:53 +02:00
perf
phy
pinctrl Revert "Revert "pinctrl: lantiq: Implement gpio_chip.to_irq"" 2016-04-01 15:21:27 +02:00
platform Convert straggling drivers to new six-argument get_user_pages() 2016-04-02 18:35:05 -05:00
pnp
power Power management and ACPI material for v4.6-rc1, part 2 2016-03-25 16:55:37 -07:00
powercap powercap: intel_rapl: Add missing Haswell model 2016-04-05 03:44:48 +02:00
pps
ps3
ptp
pwm
rapidio Convert straggling drivers to new six-argument get_user_pages() 2016-04-02 18:35:05 -05:00
ras
regulator
remoteproc remoteproc: st: fix check of syscon_regmap_lookup_by_phandle() return value 2016-03-28 16:19:00 -07:00
reset
rpmsg
rtc RTC for 4.6 #2 2016-03-24 22:49:08 -07:00
s390 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux 2016-04-01 07:15:54 -05:00
sbus
scsi SCSI fixes on 20160408 2016-04-09 12:00:42 -07:00
sfi
sh
sn
soc
spi Merge remote-tracking branches 'spi/fix/omap2' and 'spi/fix/rockchip' into spi-linus 2016-04-04 10:05:49 -07:00
spmi
ssb
staging Staging / IIO driver fixes for 4.6-rc3 2016-04-09 12:09:37 -07:00
target target: add a new add_wwn_groups fabrics method 2016-03-30 20:06:44 -07:00
tc
thermal
thunderbolt
tty tty: Fix merge of "tty: Refactor tty_open()" 2016-03-31 20:49:39 -07:00
uio
usb USB fixes for 4.6-rc3 2016-04-09 12:23:02 -07:00
uwb
vfio
vhost
video mm, fs: get rid of PAGE_CACHE_* and page_cache_{get,release} macros 2016-04-04 10:41:08 -07:00
virt
virtio virtio: virtio 1.0 cs04 spec compliance for reset 2016-04-07 15:16:39 +03:00
vlynq
vme
w1
watchdog
xen xen/events: Mask a moving irq 2016-04-04 11:18:00 +01:00
zorro
Kconfig
Makefile