linux-uconsole/drivers
Mark Bloch 698a8dddb8 IB/cm: Mark stale CM id's whenever the mad agent was unregistered
commit 9db0ff53cb upstream.

When there is a CM id object that has port assigned to it, it means that
the cm-id asked for the specific port that it should go by it, but if
that port was removed (hot-unplug event) the cm-id was not updated.
In order to fix that the port keeps a list of all the cm-id's that are
planning to go by it, whenever the port is removed it marks all of them
as invalid.

This commit fixes a kernel panic which happens when running traffic between
guests and we force reboot a guest mid traffic, it triggers a kernel panic:

 Call Trace:
  [<ffffffff815271fa>] ? panic+0xa7/0x16f
  [<ffffffff8152b534>] ? oops_end+0xe4/0x100
  [<ffffffff8104a00b>] ? no_context+0xfb/0x260
  [<ffffffff81084db2>] ? del_timer_sync+0x22/0x30
  [<ffffffff8104a295>] ? __bad_area_nosemaphore+0x125/0x1e0
  [<ffffffff81084240>] ? process_timeout+0x0/0x10
  [<ffffffff8104a363>] ? bad_area_nosemaphore+0x13/0x20
  [<ffffffff8104aabf>] ? __do_page_fault+0x31f/0x480
  [<ffffffff81065df0>] ? default_wake_function+0x0/0x20
  [<ffffffffa0752675>] ? free_msg+0x55/0x70 [mlx5_core]
  [<ffffffffa0753434>] ? cmd_exec+0x124/0x840 [mlx5_core]
  [<ffffffff8105a924>] ? find_busiest_group+0x244/0x9f0
  [<ffffffff8152d45e>] ? do_page_fault+0x3e/0xa0
  [<ffffffff8152a815>] ? page_fault+0x25/0x30
  [<ffffffffa024da25>] ? cm_alloc_msg+0x35/0xc0 [ib_cm]
  [<ffffffffa024e821>] ? ib_send_cm_dreq+0xb1/0x1e0 [ib_cm]
  [<ffffffffa024f836>] ? cm_destroy_id+0x176/0x320 [ib_cm]
  [<ffffffffa024fb00>] ? ib_destroy_cm_id+0x10/0x20 [ib_cm]
  [<ffffffffa034f527>] ? ipoib_cm_free_rx_reap_list+0xa7/0x110 [ib_ipoib]
  [<ffffffffa034f590>] ? ipoib_cm_rx_reap+0x0/0x20 [ib_ipoib]
  [<ffffffffa034f5a5>] ? ipoib_cm_rx_reap+0x15/0x20 [ib_ipoib]
  [<ffffffff81094d20>] ? worker_thread+0x170/0x2a0
  [<ffffffff8109b2a0>] ? autoremove_wake_function+0x0/0x40
  [<ffffffff81094bb0>] ? worker_thread+0x0/0x2a0
  [<ffffffff8109aef6>] ? kthread+0x96/0xa0
  [<ffffffff8100c20a>] ? child_rip+0xa/0x20
  [<ffffffff8109ae60>] ? kthread+0x0/0xa0
  [<ffffffff8100c200>] ? child_rip+0x0/0x20

Fixes: a977049dac ("[PATCH] IB: Add the kernel CM implementation")
Signed-off-by: Mark Bloch <markb@mellanox.com>
Signed-off-by: Erez Shitrit <erezsh@mellanox.com>
Reviewed-by: Maor Gottlieb <maorg@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-26 09:54:54 +01:00
..
accessibility
acpi ACPI / APEI: Fix incorrect return value of ghes_proc() 2016-11-18 10:48:37 +01:00
amba
android ANDROID: binder: Clear binder and cookie when setting handle in flat binder struct 2016-11-10 16:36:33 +01:00
ata libata: LITE-ON CX1-JB256-HP needs lower max_sectors 2016-08-10 11:49:29 +02:00
atm
auxdisplay
base PM / sleep: don't suspend parent when async child suspend_{noirq, late} fails 2016-11-26 09:54:53 +01:00
bcma x86/quirks: Add early quirk to reset Apple AirPort card 2016-08-10 11:49:24 +02:00
block drbd: Fix kernel_sendmsg() usage - potential NULL deref 2016-11-18 10:48:35 +01:00
bluetooth Bluetooth: Add support for Intel Bluetooth device 8265 [8087:0a2b] 2016-09-15 08:27:49 +02:00
bus bus: arm-ccn: Fix XP watchpoint settings bitmask 2016-09-24 10:07:40 +02:00
cdrom
char hwrng: core - Don't use a stack buffer in add_early_randomness() 2016-11-18 10:48:36 +01:00
clk clk: mmp: mmp2: fix return value check in mmp2_clk_init() 2016-11-26 09:54:53 +01:00
clocksource clocksource/drivers/sun4i: Clear interrupts after stopping timer in probe function 2016-09-24 10:07:35 +02:00
connector connector: bump skb->users before callback invocation 2016-01-04 21:46:45 -05:00
cpufreq cpufreq: intel_pstate: Fix unsafe HWP MSR access 2016-10-28 03:01:26 -04:00
cpuidle ARM: cpuidle: Fix error return code 2016-10-16 17:36:15 +02:00
crypto crypto: caam - do not register AES-XTS mode on LP units 2016-11-26 09:54:52 +01:00
dca
devfreq
dio
dma dmaengine: at_xdmac: fix spurious flag status for mem2mem transfers 2016-11-18 10:48:36 +01:00
dma-buf
edac EDAC: Increment correct counter in edac_inc_ue_error() 2016-09-07 08:32:41 +02:00
eisa
extcon extcon: max77843: Use correct size for reading the interrupt register 2016-05-04 14:48:54 -07:00
firewire firewire: net: fix fragmented datagram_size off-by-one 2016-11-10 16:36:35 +01:00
firmware efi: Expose non-blocking set_variable() wrapper to efivars 2016-05-04 14:48:49 -07:00
fmc
fpga
gpio gpio: mpc8xxx: Correct irq handler function 2016-10-28 03:01:25 -04:00
gpu drm/amdgpu: Attach exclusive fence to prime exported bo's. (v5) 2016-11-26 09:54:52 +01:00
hid HID: usbhid: add ATEN CS962 to list of quirky devices 2016-11-10 16:36:37 +01:00
hsi
hv hv: do not lose pending heartbeat vmbus packets 2016-11-10 16:36:34 +01:00
hwmon hwmon: (adt7411) set bit 3 in CFG1 register 2016-10-07 15:23:42 +02:00
hwspinlock drivers/hwspinlock: fix race between radix tree insertion and lookup 2016-02-25 12:01:23 -08:00
hwtracing intel_th: Fix a deadlock in modprobing 2016-08-10 11:49:30 +02:00
i2c i2c: mux: fix up dependencies 2016-11-26 09:54:52 +01:00
ide
idle intel_idle: Support for Intel Xeon Phi Processor x200 Product Family 2016-09-15 08:27:46 +02:00
iio iio: orientation: hid-sensor-rotation: Add PM function (fix non working driver) 2016-11-18 10:48:35 +01:00
infiniband IB/cm: Mark stale CM id's whenever the mad agent was unregistered 2016-11-26 09:54:54 +01:00
input Input: i8042 - add XMG C504 to keyboard reset table 2016-11-10 16:36:35 +01:00
iommu iommu/vt-d: Fix dead-locks in disable_dmar_iommu() path 2016-11-18 10:48:36 +01:00
ipack
irqchip irqchip/gicv3: Handle loop timeout proper 2016-10-28 03:01:33 -04:00
isdn ser_gigaset: remove unnecessary kfree() calls from release method 2015-12-15 13:24:21 -05:00
leds
lguest
lightnvm lightnvm: put bio before return 2016-09-24 10:07:35 +02:00
macintosh
mailbox
mcb mcb: Fixed bar number assignment for the gdd 2016-06-01 12:15:53 -07:00
md dm mirror: fix read error on recovery after default leg failure 2016-11-10 16:36:35 +01:00
media dib0700: fix nec repeat handling 2016-11-18 10:48:34 +01:00
memory memory: omap-gpmc: Fix omap gpmc EXTRADELAY timing 2016-07-27 09:47:35 -07:00
memstick memstick: rtsx_usb_ms: Manage runtime PM when accessing the device 2016-10-28 03:01:35 -04:00
message
mfd mfd: core: Fix device reference leak in mfd_clone_cell 2016-11-26 09:54:53 +01:00
misc mei: bus: fix received data size check in NFC fixup 2016-11-18 10:48:36 +01:00
mmc mmc: mxs: Initialize the spinlock prior to using it 2016-11-18 10:48:37 +01:00
mtd ubi: fastmap: Fix add_vol() return value test in ubi_attach_fastmap() 2016-11-10 16:36:37 +01:00
net iwlwifi: pcie: fix SPLC structure parsing 2016-11-26 09:54:53 +01:00
nfc mei: bus: fix received data size check in NFC fixup 2016-11-18 10:48:36 +01:00
ntb
nubus
nvdimm libnvdimm, pfn: fix uuid validation 2016-04-20 15:41:54 +09:00
nvme nvme: Call pci_disable_device on the error path. 2016-09-15 08:27:51 +02:00
nvmem nvmem: mxs-ocotp: fix buffer overflow in read 2016-05-11 11:21:21 +02:00
of of: silence warnings due to max() usage 2016-11-15 07:46:39 +01:00
oprofile
parisc parisc iommu: fix panic due to trying to allocate too large region 2015-12-12 16:07:25 +01:00
parport
pci PCI: Mark Atheros AR9580 to avoid bus reset 2016-10-28 03:01:26 -04:00
pcmcia pcmcia: db1xxx_ss: fix last irq_to_gpio user 2016-04-20 15:42:09 +09:00
perf drivers/perf: arm_pmu: Fix leak in error path 2016-10-07 15:23:41 +02:00
phy phy: core: fix wrong err handle for phy_power_on 2016-03-03 15:07:28 -08:00
pinctrl pinctrl: cherryview: Prevent possible interrupt storm on resume 2016-11-18 10:48:34 +01:00
platform toshiba-wmi: Fix loading the driver on non Toshiba laptops 2016-11-18 10:48:35 +01:00
pnp PNP: Add Broadwell to Intel MCH size workaround 2016-08-16 09:30:48 +02:00
power power: bq24257: Fix use of uninitialized pointer bq->charger 2016-10-31 04:14:00 -06:00
powercap powercap / RAPL: fix BIOS lock check 2015-12-12 02:31:11 +01:00
pps pps: do not crash when failed to register 2016-08-10 11:49:25 +02:00
ps3
ptp
pwm pwm: Unexport children before chip removal 2016-11-10 16:36:37 +01:00
rapidio
ras
regulator regulator: tps65910: Work around silicon erratum SWCZ010 2016-10-28 03:01:25 -04:00
remoteproc remoteproc: Fix potential race condition in rproc_add 2016-08-20 18:09:20 +02:00
reset
rpmsg
rtc rtc: omap: Fix selecting external osc 2016-11-26 09:54:53 +01:00
s390 s390/con3270: fix insufficient space padding 2016-10-31 04:14:00 -06:00
sbus
scsi scsi: mpt3sas: Fix for block device of raid exists even after deleting raid disk 2016-11-18 10:48:36 +01:00
sfi
sh drivers: sh: Restore legacy clock domain on SuperH platforms 2016-03-09 15:34:49 -08:00
sn
soc soc: qcom/spm: shut up uninitialized variable warning 2016-09-24 10:07:42 +02:00
spi spi: spi-fsl-dspi: Drop extra spi_master_put in device remove function 2016-10-31 04:13:59 -06:00
spmi
ssb
staging staging: nvec: remove managed resource from PS2 driver 2016-11-18 10:48:35 +01:00
target target: Don't override EXTENDED_COPY xcopy_pt_cmd SCSI status code 2016-10-28 03:01:36 -04:00
tc
thermal thermal: cpu_cooling: fix improper order during initialization 2016-07-27 09:47:29 -07:00
thunderbolt thunderbolt: Fix double free of drom buffer 2016-06-01 12:15:53 -07:00
tty sparc: serial: sunhv: fix a double lock bug 2016-11-21 10:06:40 +01:00
uio uio: fix dmem_region_start computation 2016-10-31 04:13:59 -06:00
usb usb: gadget: u_ether: remove interrupt throttling 2016-11-18 10:48:35 +01:00
uwb uwb: fix device reference leaks 2016-11-26 09:54:53 +01:00
vfio vfio/pci: Fix NULL pointer oops in error interrupt setup handling 2016-09-07 08:32:37 +02:00
vhost vhost/scsi: fix reuse of &vq->iov[out] in response 2016-09-15 08:27:53 +02:00
video fbdev/efifb: Fix 16 color palette entry calculation 2016-10-28 03:01:29 -04:00
virt
virtio virtio_ring: Make interrupt suppression spec compliant 2016-11-10 16:36:34 +01:00
vlynq
vme
w1 w1:omap_hdq: fix regression 2016-08-20 18:09:22 +02:00
watchdog watchdog: rc32434_wdt: fix ioctl error handling 2016-04-12 09:08:54 -07:00
xen xenbus: don't look up transaction IDs for ordinary writes 2016-10-31 04:13:58 -06:00
zorro
Kconfig
Makefile