linux-imx/drivers/infiniband
Bob Pearson 03ff3e23ad RDMA/rxe: Fix incorrect rxe_put in error path
[ Upstream commit 8776618dbb ]

In rxe_send() a ref is taken on the qp to keep it alive until the
kfree_skb() has a chance to call the skb destructor rxe_skb_tx_dtor()
which drops the reference. If the packet has an incorrect protocol the
error path just calls kfree_skb() which will call the destructor which
will drop the ref. Currently the driver also calls rxe_put() which is
incorrect. Additionally since the packets sent to rxe_send() are under the
control of the driver and it only ever produces IPV4 or IPV6 packets the
simplest fix is to remove all the code in this block.

Link: https://lore.kernel.org/r/20240329145513.35381-12-rpearsonhpe@gmail.com
Signed-off-by: Bob Pearson <rpearsonhpe@gmail.com>
Fixes: 9eb7f8e44d ("IB/rxe: Move refcounting earlier in rxe_send()")
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-06-12 11:12:07 +02:00
..
core RDMA/cm: Print the old state when cm_destroy_id gets timeout 2024-04-27 17:11:34 +02:00
hw RDMA/hns: Modify the print level of CQE error 2024-06-12 11:12:06 +02:00
sw RDMA/rxe: Fix incorrect rxe_put in error path 2024-06-12 11:12:07 +02:00
ulp RDMA/rtrs-clt: Check strnlen return len in sysfs mpath_policy_store() 2024-03-26 18:20:01 -04:00
Kconfig RDMA: Disable IB HW for UML 2022-12-04 15:22:03 +02:00
Makefile