RDMA/srpt: Support specifying the srpt_service_guid parameter
authorBart Van Assche <bvanassche@acm.org>
Mon, 5 Feb 2024 00:42:07 +0000 (16:42 -0800)
committerLeon Romanovsky <leon@kernel.org>
Mon, 5 Feb 2024 07:57:53 +0000 (09:57 +0200)
commitfdfa083549de5d50ebf7f6811f33757781e838c0
tree6a9984918bb07901d99b8f85430c9ab11d90016f
parente6f57c6881916df39db7d95981a8ad2b9c3458d6
RDMA/srpt: Support specifying the srpt_service_guid parameter

Make loading ib_srpt with this parameter set work. The current behavior is
that setting that parameter while loading the ib_srpt kernel module
triggers the following kernel crash:

BUG: kernel NULL pointer dereference, address: 0000000000000000
Call Trace:
 <TASK>
 parse_one+0x18c/0x1d0
 parse_args+0xe1/0x230
 load_module+0x8de/0xa60
 init_module_from_file+0x8b/0xd0
 idempotent_init_module+0x181/0x240
 __x64_sys_finit_module+0x5a/0xb0
 do_syscall_64+0x5f/0xe0
 entry_SYSCALL_64_after_hwframe+0x6e/0x76

Cc: LiHonggang <honggangli@163.com>
Reported-by: LiHonggang <honggangli@163.com>
Fixes: a42d985bd5b2 ("ib_srpt: Initial SRP Target merge for v3.3-rc1")
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Link: https://lore.kernel.org/r/20240205004207.17031-1-bvanassche@acm.org
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/ulp/srpt/ib_srpt.c