summaryrefslogtreecommitdiff
path: root/rust/helpers
diff options
context:
space:
mode:
authorTomer Tayar <tomer.tayar@intel.com>2024-07-25 11:39:58 +0300
committerKoby Elbaz <koby.elbaz@intel.com>2025-09-25 09:09:27 +0300
commitd0dd796becb08b164fb2d791dca4a76127b3e89a (patch)
tree281b361c20cf4b6ebf90e9086ce419a5c52360fc /rust/helpers
parentb5cddeb0dc6521dfee669e74967c6d28b1fd0d9e (diff)
accel/habanalabs: clarify ctx use after hl_ctx_put() in dmabuf release
In hl_release_dmabuf(), ctx is dereferenced after calling hl_ctx_put() to obtain the compute device file. This is safe because the dma-buf object holds a file reference taken in export_dmabuf(), and the file release (which drops another ctx reference) can only happen after we drop that file reference via fput(). Thus, this hl_ctx_put() call cannot be the last one at this point. Add a comment explaining this to avoid confusion. Signed-off-by: Tomer Tayar <tomer.tayar@intel.com> Reviewed-by: Koby Elbaz <koby.elbaz@intel.com> Signed-off-by: Koby Elbaz <koby.elbaz@intel.com>
Diffstat (limited to 'rust/helpers')
0 files changed, 0 insertions, 0 deletions