Re: [PATCH V3 3/7] cxl: Keep track of mm struct associated with a context
From: Andrew Donnellan <hidden>
Date: 2017-03-29 02:59:40
From: Andrew Donnellan <hidden>
Date: 2017-03-29 02:59:40
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 <redacted>
Reviewed-by: Andrew Donnellan <redacted> -- Andrew Donnellan OzLabs, ADL Canberra andrew.donnellan@au1.ibm.com IBM Australia Limited