diff options
| author | 2022-07-29 16:30:48 +0300 | |
|---|---|---|
| committer | 2022-09-18 13:29:51 +0300 | |
| commit | 5f46217221dfdda94244d88ac6c1354293fc681b (patch) | |
| tree | fd85824f40c113ec56dd03b5c26b9fe12d6b3b0a /include | |
| parent | habanalabs: avoid returning a valid handle if map_block() fails (diff) | |
| download | linux-dev-5f46217221dfdda94244d88ac6c1354293fc681b.tar.xz linux-dev-5f46217221dfdda94244d88ac6c1354293fc681b.zip | |
habanalabs: fix vma fields assignments order in hl_hw_block_mmap()
In hl_hw_block_mmap(), the vma's 'vm_private_data' and 'vm_ops' fields
are assigned before filling the content of the private data.
In between there is a call to the ASIC hw_block_mmap() function, and if
it fails, the vma close function will be called with a bad private data
value.
Fix the order of assignments to avoid this issue.
In hl_hw_block_mmap() the vma's 'vm_private_data and vm_ops are assigned
before setting the
Signed-off-by: Tomer Tayar <ttayar@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions
