* [PATCH] RDMA/ocrdma: Release user memory when MR registration fails
@ 2026-11-03 8:12 Wentao Liang
2026-11-03 8:19 ` sashiko-bot
2026-11-03 9:21 ` Krzysztof Kozlowski
0 siblings, 2 replies; 3+ messages in thread
From: Wentao Liang @ 2026-11-03 8:12 UTC (permalink / raw)
To: selvin.xavier, jgg, leon; +Cc: linux-rdma, linux-kernel, Wentao Liang, stable
ocrdma_reg_user_mr() pins and maps user memory before preparing its page
buffer list and registering the MR. If any subsequent step fails, the
error paths free the MR and any allocated PBL tables, but never release
the user memory. The pages remain pinned and DMA mapped, and the locked
memory accounting is not restored.
Release the umem on these failures. Use a separate label for failure of
ib_umem_get_va() itself so its error pointer is never passed to the
release function.
Fixes: fe2caefcdf58 ("RDMA/ocrdma: Add driver for Emulex OneConnect IBoE RDMA adapter")
Cc: stable@vger.kernel.org
Assisted-by: DeepSeek-V4.1-Flash and OpenAI Codex
Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>
---
drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
index 97c2e18e67ad..94a61127fb39 100644
--- a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
+++ b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
@@ -868,7 +868,7 @@ struct ib_mr *ocrdma_reg_user_mr(struct ib_pd *ibpd, u64 start, u64 len,
mr->umem = ib_umem_get_va(ibpd->device, start, len, acc);
if (IS_ERR(mr->umem)) {
status = -EFAULT;
- goto umem_err;
+ goto err_free_mr;
}
status = ocrdma_get_pbl_info(
dev, mr, ib_umem_num_dma_blocks(mr->umem, PAGE_SIZE));
@@ -899,6 +899,8 @@ struct ib_mr *ocrdma_reg_user_mr(struct ib_pd *ibpd, u64 start, u64 len,
mbx_err:
ocrdma_free_mr_pbl_tbl(dev, &mr->hwmr);
umem_err:
+ ib_umem_release(mr->umem);
+err_free_mr:
kfree(mr);
return ERR_PTR(status);
}
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] RDMA/ocrdma: Release user memory when MR registration fails
2026-11-03 8:12 [PATCH] RDMA/ocrdma: Release user memory when MR registration fails Wentao Liang
@ 2026-11-03 8:19 ` sashiko-bot
2026-11-03 9:21 ` Krzysztof Kozlowski
1 sibling, 0 replies; 3+ messages in thread
From: sashiko-bot @ 2026-11-03 8:19 UTC (permalink / raw)
To: Wentao Liang; +Cc: linux-rdma
> ocrdma_reg_user_mr() pins and maps user memory before preparing its page
> buffer list and registering the MR. If any subsequent step fails, the
> error paths free the MR and any allocated PBL tables, but never release
> the user memory. The pages remain pinned and DMA mapped, and the locked
> memory accounting is not restored.
>
> Release the umem on these failures. Use a separate label for failure of
> ib_umem_get_va() itself so its error pointer is never passed to the
> release function.
>
> Fixes: fe2caefcdf58 ("RDMA/ocrdma: Add driver for Emulex OneConnect IBoE RDMA adapter")
> Cc: stable@vger.kernel.org
> Assisted-by: DeepSeek-V4.1-Flash and OpenAI Codex
> Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261103081212.1137625-1-vulab@iscas.ac.cn?part=1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] RDMA/ocrdma: Release user memory when MR registration fails
2026-11-03 8:12 [PATCH] RDMA/ocrdma: Release user memory when MR registration fails Wentao Liang
2026-11-03 8:19 ` sashiko-bot
@ 2026-11-03 9:21 ` Krzysztof Kozlowski
1 sibling, 0 replies; 3+ messages in thread
From: Krzysztof Kozlowski @ 2026-11-03 9:21 UTC (permalink / raw)
To: Wentao Liang; +Cc: linux-kernel, linux-rdma, stable, selvin.xavier, jgg, leon
On Tue, 03 Nov 2026 08:12:12 +0000, Wentao Liang wrote:
> ocrdma_reg_user_mr() pins and maps user memory before preparing its page
> buffer list and registering the MR. If any subsequent step fails, the
> error paths free the MR and any allocated PBL tables, but never release
> the user memory. The pages remain pinned and DMA mapped, and the locked
> memory accounting is not restored.
>
> Release the umem on these failures. Use a separate label for failure of
> ib_umem_get_va() itself so its error pointer is never passed to the
> release function.
>
> Fixes: fe2caefcdf58 ("RDMA/ocrdma: Add driver for Emulex OneConnect IBoE RDMA adapter")
> Cc: stable@vger.kernel.org
> Assisted-by: DeepSeek-V4.1-Flash and OpenAI Codex
> Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>
> ---
> drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
Multiple things here:
1. Your team ignored completely previous feedback. Multiple times.
2. You use multiple identities with this email address, thus I doubt that we
speak with an actual person.
3. Your bot does not even bother running checkpatch, right?
4. Nothing of this was reproduced nor tested.
5. Finally, the same feedback:
You sent multiple independent patches, to multiple independent
subsystems. The amount of these patches clearly suggest this was
AI generated and most likely not tested.
More importantly, you sent all this work without properly organizing
relevant patches into patchsets. This makes reviewing difficult
and might cause multiple reviewers to address the same issue.
Replying to the entire set is impossible and requires handling each
patch independently, instead of applying or discarding the set.
Maintainers also won't see the bigger picture of your work. Quite
worrying.
This is on the verge of hostile patch: bomb us with so many
contributions, we won't be able to handle them in efficient manner,
like responding ONCE to ask you to slow down. Considering all this
is untested and LLM generated, I have even more doubts whether this
should be considered for review.
Please read kernel documentation BEFORE posting more work. It will
explain you how to identify subsystems, how to organize your work per
subsystem (so a patchset grouping multiple patches with a short cover
letter), how to document the issue discovery method and what was
or was not tested.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-11-03 9:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-03 8:12 [PATCH] RDMA/ocrdma: Release user memory when MR registration fails Wentao Liang
2026-11-03 8:19 ` sashiko-bot
2026-11-03 9:21 ` Krzysztof Kozlowski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox