From: Zhu Yanjun <yanjun.zhu@linux.dev>
To: Alok Tiwari <alok.a.tiwari@oracle.com>,
bvanassche@acm.org, dledford@redhat.com, jgg@ziepe.ca,
linux-rdma@vger.kernel.org, target-devel@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org,
darren.kenny@oracle.com
Subject: Re: [PATCH 5.4.y] RDMA/srpt: Support specifying the srpt_service_guid parameter
Date: Fri, 4 Apr 2025 15:40:39 +0200 [thread overview]
Message-ID: <3291d0f9-40af-4e8d-aa08-b84132caf03d@linux.dev> (raw)
In-Reply-To: <20250403125955.2553106-1-alok.a.tiwari@oracle.com>
On 03.04.25 14:59, Alok Tiwari wrote:
> From: Bart Van Assche <bvanassche@acm.org>
>
> [ Upstream commit fdfa083549de5d50ebf7f6811f33757781e838c0 ]
>
> 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>
> Signed-off-by: Sasha Levin <sashal@kernel.org>
> [Alok: Backport to 5.4.y since the commit has already been backported to
> 5.15y, 5.10.y, and 4.19.y]
> Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com>
Not sure if this "Cc: stable@vger.kernel.org" is needed to notify the
engineer of stable branch or not.
Zhu Yanjun
> ---
> drivers/infiniband/ulp/srpt/ib_srpt.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.c b/drivers/infiniband/ulp/srpt/ib_srpt.c
> index d03a4f2e006f..f5fd8c1058ce 100644
> --- a/drivers/infiniband/ulp/srpt/ib_srpt.c
> +++ b/drivers/infiniband/ulp/srpt/ib_srpt.c
> @@ -79,12 +79,16 @@ module_param(srpt_srq_size, int, 0444);
> MODULE_PARM_DESC(srpt_srq_size,
> "Shared receive queue (SRQ) size.");
>
> +static int srpt_set_u64_x(const char *buffer, const struct kernel_param *kp)
> +{
> + return kstrtou64(buffer, 16, (u64 *)kp->arg);
> +}
> static int srpt_get_u64_x(char *buffer, const struct kernel_param *kp)
> {
> return sprintf(buffer, "0x%016llx", *(u64 *)kp->arg);
> }
> -module_param_call(srpt_service_guid, NULL, srpt_get_u64_x, &srpt_service_guid,
> - 0444);
> +module_param_call(srpt_service_guid, srpt_set_u64_x, srpt_get_u64_x,
> + &srpt_service_guid, 0444);
> MODULE_PARM_DESC(srpt_service_guid,
> "Using this value for ioc_guid, id_ext, and cm_listen_id instead of using the node_guid of the first HCA.");
>
prev parent reply other threads:[~2025-04-04 13:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-03 12:59 [PATCH 5.4.y] RDMA/srpt: Support specifying the srpt_service_guid parameter Alok Tiwari
2025-04-03 16:13 ` Sasha Levin
2025-04-04 13:40 ` Zhu Yanjun [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3291d0f9-40af-4e8d-aa08-b84132caf03d@linux.dev \
--to=yanjun.zhu@linux.dev \
--cc=alok.a.tiwari@oracle.com \
--cc=bvanassche@acm.org \
--cc=darren.kenny@oracle.com \
--cc=dledford@redhat.com \
--cc=jgg@ziepe.ca \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=target-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).