aboutsummaryrefslogtreecommitdiff
path: root/net/lapb/lapb_timer.c
diff options
context:
space:
mode:
authorNiklas Schnelle <[email protected]>2021-09-08 10:18:48 +0200
committerJason Gunthorpe <[email protected]>2021-09-08 08:31:10 -0300
commit9660dcbe0d9186976917c94bce4e69dbd8d7a974 (patch)
treee318ecbc567f8ac56b53d71e71bc167461eca579 /net/lapb/lapb_timer.c
parent6a217437f9f5482a3f6f2dc5fcd27cf0f62409ac (diff)
RDMA/mlx5: Fix number of allocated XLT entries
In commit 8010d74b9965b ("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: [email protected] Fixes: 8010d74b9965 ("RDMA/mlx5: Split the WR setup out of mlx5_ib_update_xlt()") Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Niklas Schnelle <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
Diffstat (limited to 'net/lapb/lapb_timer.c')
0 files changed, 0 insertions, 0 deletions