kernel_samsung_a53x/drivers/infiniband/ulp
William Kucharski 5ebebb57ef RDMA/srpt: Do not register event handler until srpt device is fully setup
[ Upstream commit c21a8870c98611e8f892511825c9607f1e2cd456 ]

Upon rare occasions, KASAN reports a use-after-free Write
in srpt_refresh_port().

This seems to be because an event handler is registered before the
srpt device is fully setup and a race condition upon error may leave a
partially setup event handler in place.

Instead, only register the event handler after srpt device initialization
is complete.

Fixes: a42d985bd5b2 ("ib_srpt: Initial SRP Target merge for v3.3-rc1")
Signed-off-by: William Kucharski <william.kucharski@oracle.com>
Link: https://lore.kernel.org/r/20240202091549.991784-2-william.kucharski@oracle.com
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 08:44:57 +01:00
..
ipoib IB/ipoib: Fix mcast list locking 2024-11-18 12:13:18 +01:00
iser IB/iser: Prevent invalidating wrong MR 2024-11-18 12:12:43 +01:00
isert Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
opa_vnic Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rtrs RDMA/rtrs-clt: Remove the warnings for req in_use check 2024-11-18 12:11:41 +01:00
srp RDMA/srp: Fix srp_abort() 2024-11-08 11:26:06 +01:00
srpt RDMA/srpt: Do not register event handler until srpt device is fully setup 2024-11-19 08:44:57 +01:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00