mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-13 07:31:07 +00:00
RDMA/irdma: Clear udata response buffers where necessary
Methods that may accept udata input but do not provide a udata response should use the ib_respond_empty_udata() helper to ensure that user response buffers are cleared. Since the ib_respond_empty_udata() call itself can fail if the user intentionally provides a bogus output buffer, it is called at the beginning of the method to fail early before mutating any state that would be difficult to unwind. Additionally, add missing bounds validation for udata->outlen in irdma_create_srq() to ensure it is large enough to hold the response struct as per its original (and so far, only) definition. Signed-off-by: Jacob Moroni <jmoroni@google.com> Link: https://patch.msgid.link/20260713171257.3131493-3-jmoroni@google.com Signed-off-by: Leon Romanovsky <leon@kernel.org>
This commit is contained in:
parent
9b5261a233
commit
91a74a2386
1 changed files with 21 additions and 0 deletions
Loading…
Add table
Add a link
Reference in a new issue