On 29/03/17 02:14, Christophe Lombard wrote:
The mm_struct corresponding to the current task is acquired each time
an interrupt is raised. So to simplify the code, we only get the
mm_struct when attaching an AFU context to the process.
The mm_count reference is increased to ensure that the mm_struct can't
be freed. The mm_struct will be released when the context is detached.
A reference on mm_users is not kept to avoid a circular dependency if
the process mmaps its cxl mmio and forget to unmap before exiting.

Signed-off-by: Christophe Lombard <clomb...@linux.vnet.ibm.com>

Reviewed-by: Andrew Donnellan <andrew.donnel...@au1.ibm.com>

--
Andrew Donnellan              OzLabs, ADL Canberra
andrew.donnel...@au1.ibm.com  IBM Australia Limited

Reply via email to