summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorSerhat Kumral <serhatkumral1@gmail.com>2026-08-06 23:13:58 +0300
committerJason Gunthorpe <jgg@nvidia.com>2026-08-20 08:46:15 -0300
commit8049741ac93acd3a590dac070e12571fddf0e294 (patch)
treeaf118e523d532a3edaeb54ef6f674f2dedb26e7f /scripts
parent60a42d510113f46de47e86a84bf5758597644487 (diff)
downloadlinux-8049741ac93acd3a590dac070e12571fddf0e294.tar.gz
linux-8049741ac93acd3a590dac070e12571fddf0e294.zip
RDMA/ucma: Allow path records to exactly fit the output buffer
ucma_query_path() emits a path record only when the remaining output buffer is strictly larger than struct ib_path_rec_data. A buffer sized exactly for the response header and N complete records therefore gets only N - 1 records, while resp->num_paths still advertises N. A caller sizing its buffer for a single record gets a header claiming one path and no path data at all. ucma_query_ib_service() in the same file computes the record count with a plain division and so accepts an exact fit; make ucma_query_path() behave the same way. Current librdmacm is unaffected because it always sizes the response for six records while the kernel currently reports at most two paths. Other users of the UAPI that provide an exactly sized buffer can observe the truncated response. Fixes: ac53b264b2f3 ("RDMA/ucma: Support querying when IB paths are not reversible") Signed-off-by: Serhat Kumral <serhatkumral1@gmail.com> Link: https://patch.msgid.link/20260806201358.147478-1-serhatkumral1@gmail.com Signed-off-by: Leon Romanovsky <leon@kernel.org> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions