linux/drivers/infiniband/hw/mlx5
Niklas Schnelle 9660dcbe0d RDMA/mlx5: Fix number of allocated XLT entries
In commit 8010d74b99 ("RDMA/mlx5: Split the WR setup out of
mlx5_ib_update_xlt()") the allocation logic was split out of
mlx5_ib_update_xlt() and the logic was changed to enable better OOM
handling. Sadly this change introduced a miscalculation of the number of
entries that were actually allocated when under memory pressure where it
can actually become 0 which on s390 lets dma_map_single() fail.

It can also lead to corruption of the free pages list when the wrong
number of entries is used in the calculation of sg->length which is used
as argument for free_pages().

Fix this by using the allocation size instead of misusing get_order(size).

Cc: stable@vger.kernel.org
Fixes: 8010d74b99 ("RDMA/mlx5: Split the WR setup out of mlx5_ib_update_xlt()")
Link: https://lore.kernel.org/r/20210908081849.7948-1-schnelle@linux.ibm.com
Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
2021-09-08 08:31:10 -03:00
..
ah.c RDMA: Restore ability to fail on AH destroy 2020-09-09 13:57:22 -03:00
cmd.c RDMA/mlx5: Move all DM logic to separate file 2021-04-13 19:36:36 -03:00
cmd.h RDMA/mlx5: Move all DM logic to separate file 2021-04-13 19:36:36 -03:00
cong.c RDMA: Support more than 255 rdma ports 2021-03-26 09:31:21 -03:00
counters.c RDMA: Split the alloc_hw_stats() ops to port and device variants 2021-06-16 20:58:29 -03:00
counters.h RDMA: Support more than 255 rdma ports 2021-03-26 09:31:21 -03:00
cq.c Merge branch 'sg_nents' into rdma.git for-next 2021-08-30 09:49:59 -03:00
devx.c Merge branch 'sg_nents' into rdma.git for-next 2021-08-30 09:49:59 -03:00
devx.h RDMA/mlx5: Cleanup DEVX initialization flow 2020-07-07 14:05:51 -03:00
dm.c RDMA/mlx5: Verify that DM operation is reasonable 2021-05-17 13:52:47 -03:00
dm.h RDMA/mlx5: Expose UAPI to query DM 2021-04-13 19:36:37 -03:00
doorbell.c RDMA: Use the sg_table directly and remove the opencoded version from umem 2021-08-24 19:52:40 -03:00
fs.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-06-18 19:47:02 -07:00
fs.h RDMA/mlx5: Separate flow steering logic from main.c 2020-07-07 14:05:51 -03:00
gsi.c RDMA: Globally allocate and release QP memory 2021-08-03 13:44:27 -03:00
ib_rep.c RDMA/mlx5: Add shared FDB support 2021-08-05 13:49:24 -07:00
ib_rep.h RDMA: Support more than 255 rdma ports 2021-03-26 09:31:21 -03:00
ib_virt.c RDMA: Support more than 255 rdma ports 2021-03-26 09:31:21 -03:00
Kconfig
mad.c RDMA: Support more than 255 rdma ports 2021-03-26 09:31:21 -03:00
main.c Merge branch 'mlx5-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux 2021-08-22 19:22:58 -03:00
Makefile RDMA/mlx5: Move all DM logic to separate file 2021-04-13 19:36:36 -03:00
mem.c RDMA/mlx5: Silence the overflow warning while building offset mask 2020-11-26 15:49:05 -04:00
mlx5_ib.h RDMA: Globally allocate and release QP memory 2021-08-03 13:44:27 -03:00
mr.c RDMA/mlx5: Fix number of allocated XLT entries 2021-09-08 08:31:10 -03:00
odp.c RDMA v5.14 merge window Pull Request 2021-07-01 14:54:03 -07:00
qos.c
qp.c RDMA/mlx5: Relax DCS QP creation checks 2021-08-30 09:47:40 -03:00
qp.h RDMA: Restore ability to return error for destroy WQ 2020-09-09 14:14:29 -03:00
qpc.c RDMA/mlx5: Support SQD2RTS for modify QP 2021-05-20 11:41:07 -03:00
restrack.c RDMA/mlx5: Assign dev to DM MR 2020-12-07 15:52:54 -04:00
restrack.h RDMA/mlx5: Separate restrack callbacks initialization from main.c 2020-07-07 14:05:51 -03:00
srq.c RDMA/mlx5: Remove unused parameter udata 2021-05-20 11:52:17 -03:00
srq.h RDMA/mlx5: Lower setting the umem's PAS for SRQ 2020-11-16 16:53:30 -04:00
srq_cmd.c RDMA/mlx5: Lower setting the umem's PAS for SRQ 2020-11-16 16:53:30 -04:00
std_types.c RDMA/mlx5: Fill port info based on the relevant eswitch 2021-08-05 13:49:24 -07:00
wr.c RDMA/mlx5: Enable Relaxed Ordering by default for kernel ULPs 2021-06-21 12:33:08 -03:00
wr.h