habanalabs: fix nullifying of destroyed mmu pgt pool
authorTomer Tayar <ttayar@habana.ai>
Thu, 8 Jul 2021 21:06:47 +0000 (00:06 +0300)
committerOded Gabbay <ogabbay@kernel.org>
Sun, 29 Aug 2021 06:47:46 +0000 (09:47 +0300)
commit89aad770d692e4d2d9a604c1674e9dfa69421430
tree622a1da9fc530b2a746e22b2b4713fd2951ef22a
parent1ee8e2bab509297bbc8320638c2a8a2d739c9b84
habanalabs: fix nullifying of destroyed mmu pgt pool

In case of host-resident MMU, when the page tables pool is destroyed,
its pointer is not nullified correctly.
As a result, on a device fini which happens after a failing reset, the
already destroyed pool is accessed, which leads to a kernel panic.
The patch fixes the setting of the pool pointer to NULL.

Signed-off-by: Tomer Tayar <ttayar@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
drivers/misc/habanalabs/common/mmu/mmu_v1.c