linux/drivers/net/ethernet
Honggang LI 59d2d18cc4 mlx5: wrong page mask if CONFIG_ARCH_DMA_ADDR_T_64BIT enabled for 32Bit architectures
If CONFIG_ARCH_DMA_ADDR_T_64BIT enabled for x86 systems and physical
memory is more than 4GB, dma_map_page may return a valid memory
address which greater than 0xffffffff. As a result, the mlx5 device page
allocator RB tree will be initialized with valid addresses greater than
0xfffffff.

However, (addr & PAGE_MASK) set the high four bytes to zeros. So, it's
impossible for the function, free_4k, to release the pages whose
addresses greater than 4GB. Memory leaks. And mlx5_ib module can't
release the pages when user try to remove the module, as a result,
system hang.

[root@rdma05 root]# dmesg  | grep addr | head
addr             = 3fe384000
addr & PAGE_MASK =  fe384000
[root@rdma05 root]# rmmod mlx5_ib   <---- hang on

---------------------- cosnole log -----------------
mlx5_ib 0000:04:00.0: irq 138 for MSI/MSI-X
  alloc irq_desc for 139 on node -1
  alloc kstat_irqs on node -1
mlx5_ib 0000:04:00.0: irq 139 for MSI/MSI-X
0000:04:00.0:free_4k:221:(pid 1519): page not found
0000:04:00.0:free_4k:221:(pid 1519): page not found
0000:04:00.0:free_4k:221:(pid 1519): page not found
0000:04:00.0:free_4k:221:(pid 1519): page not found
---------------------- cosnole log -----------------

Fixes: bf0bf77f65 ('mlx5: Support communicating arbitrary host page size to firmware')
Signed-off-by: Honggang Li <honli@redhat.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
2015-04-15 16:20:51 -04:00
..
3com drivers/net: Use setup_timer and mod_timer 2015-02-11 19:40:12 -08:00
8390 net: 8390: axnet_cs: Use setup_timer and mod_timer 2015-03-01 13:40:23 -05:00
adaptec
adi ptp: blackfin: use helpers for converting ns to timespec. 2015-03-31 17:19:19 -04:00
aeroflex net: greth: constify of_device_id array 2015-03-17 15:00:22 -04:00
agere et131x: use msecs_to_jiffies for conversions 2015-02-11 19:37:43 -08:00
allwinner ethernet: codespell comment spelling fixes 2015-03-08 22:54:22 -04:00
alteon net: rename vlan_tx_* helpers since "tx" is misleading there 2015-01-13 17:51:08 -05:00
altera Altera TSE: constify of_device_id array 2015-03-17 15:00:21 -04:00
amd amd-xgbe: Add support for the netdev Tx watchdog 2015-04-09 17:35:37 -04:00
apm drivers: net: xgene: Add separate tx completion ring 2015-03-27 14:18:48 -07:00
apple net: ethernet: apple: constify of_device_id array 2015-03-17 15:00:22 -04:00
arc
atheros ethernet: codespell comment spelling fixes 2015-03-08 22:54:22 -04:00
broadcom Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2015-04-15 09:00:47 -07:00
brocade ethernet: codespell comment spelling fixes 2015-03-08 22:54:22 -04:00
cadence net/macb: sqe_test_errors are TX errors, not RX errors 2015-04-12 20:42:29 -04:00
calxeda ethernet: codespell comment spelling fixes 2015-03-08 22:54:22 -04:00
chelsio cxgb4: Don't call t4_slow_intr_handler when we're not the Master PF 2015-04-14 15:08:52 -04:00
cirrus ethernet: codespell comment spelling fixes 2015-03-08 22:54:22 -04:00
cisco Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-03-03 21:16:48 -05:00
davicom dm9000: Add regulator and reset support to dm9000 2015-01-15 14:08:07 -05:00
dec Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-03-20 18:51:09 -04:00
dlink
emulex Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-04-14 15:44:14 -04:00
faraday
freescale Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-04-02 16:16:53 -04:00
fujitsu
hisilicon net: hip04: add missing MODULE_LICENSE 2015-02-02 18:51:03 -08:00
hp hp100: fix misspelling of current function in string 2014-12-09 16:18:47 -05:00
i825xx
ibm Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-03-20 18:51:09 -04:00
icplus
intel fm10k: Bump driver version to 0.15.2 2015-04-14 15:57:02 -07:00
marvell Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-04-06 22:34:15 -04:00
mellanox mlx5: wrong page mask if CONFIG_ARCH_DMA_ADDR_T_64BIT enabled for 32Bit architectures 2015-04-15 16:20:51 -04:00
micrel ethernet: Use eth_<foo>_addr instead of memset 2015-03-03 17:01:36 -05:00
microchip
moxa ethernet: codespell comment spelling fixes 2015-03-08 22:54:22 -04:00
myricom myri10ge: Delete an unnecessary check before the function call "kfree" 2015-02-05 00:25:10 -08:00
natsemi net: rename vlan_tx_* helpers since "tx" is misleading there 2015-01-13 17:51:08 -05:00
neterion s2io: Update driver to use dma_wmb 2015-04-08 12:15:14 -04:00
nuvoton
nvidia net: rename vlan_tx_* helpers since "tx" is misleading there 2015-01-13 17:51:08 -05:00
nxp
octeon netdev: octeon_mgmt: constify of_device_id array 2015-03-17 15:00:22 -04:00
oki-semi ethernet: codespell comment spelling fixes 2015-03-08 22:54:22 -04:00
packetengines ethernet: codespell comment spelling fixes 2015-03-08 22:54:22 -04:00
pasemi net: pasemi: Use setup_timer and mod_timer 2015-03-01 13:40:23 -05:00
qlogic Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2015-04-15 09:00:47 -07:00
qualcomm ethernet: codespell comment spelling fixes 2015-03-08 22:54:22 -04:00
rdc
realtek r8169: Fix trivial typo in rtl_check_firmware 2015-02-24 16:26:07 -05:00
renesas sh_eth: Mitigate lost statistics updates 2015-03-04 15:40:54 -05:00
rocker Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-04-02 16:16:53 -04:00
samsung ethernet: codespell comment spelling fixes 2015-03-08 22:54:22 -04:00
seeq
sfc sfc: Revert SRIOV changes. 2015-04-08 16:30:01 -04:00
sgi
silan
sis
smsc net: smc91x: Remove an unused variable 2015-03-31 16:41:12 -04:00
stmicro stmmac: devm_reset_control_get can return PROBE_DEFER 2015-04-09 14:11:19 -04:00
sun sungem, sunhme, sunvnet: Update drivers to use dma_wmb/rmb 2015-04-08 12:15:14 -04:00
tehuti net: rename vlan_tx_* helpers since "tx" is misleading there 2015-01-13 17:51:08 -05:00
ti ptp: cpts: use helpers for converting ns to timespec. 2015-03-31 17:19:19 -04:00
tile ptp: tilegx: convert to the 64 bit get/set time methods. 2015-03-31 12:01:18 -04:00
toshiba toshiba: Remove celleb from Kconfig options 2015-04-14 14:57:10 -04:00
tundra
via via-velocity: constify of_device_id array 2015-03-17 15:00:24 -04:00
wiznet Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-03-20 18:51:09 -04:00
xilinx ethernet: Use bool function returns of true/false instead of 1/0 2015-03-31 14:09:49 -04:00
xircom
xscale Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-03-03 21:16:48 -05:00
dnet.c net: dnet: fix dnet_poll() 2015-01-11 21:44:55 -05:00
dnet.h
ec_bhf.c
ethoc.c net: ethoc: constify of_device_id array 2015-03-17 15:00:21 -04:00
fealnx.c
jme.c net: rename vlan_tx_* helpers since "tx" is misleading there 2015-01-13 17:51:08 -05:00
jme.h
Kconfig net: s6gmac: remove driver 2014-12-22 16:29:03 -05:00
korina.c
lantiq_etop.c
Makefile net: s6gmac: remove driver 2014-12-22 16:29:03 -05:00
netx-eth.c