aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/cxl/context.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/misc/cxl/context.c')
-rw-r--r--drivers/misc/cxl/context.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/misc/cxl/context.c b/drivers/misc/cxl/context.c
index 8c32040b9c09..12a41b2753f0 100644
--- a/drivers/misc/cxl/context.c
+++ b/drivers/misc/cxl/context.c
@@ -18,6 +18,7 @@
18#include <linux/slab.h> 18#include <linux/slab.h>
19#include <linux/idr.h> 19#include <linux/idr.h>
20#include <linux/sched/mm.h> 20#include <linux/sched/mm.h>
21#include <linux/mmu_context.h>
21#include <asm/cputable.h> 22#include <asm/cputable.h>
22#include <asm/current.h> 23#include <asm/current.h>
23#include <asm/copro.h> 24#include <asm/copro.h>
@@ -267,6 +268,8 @@ int __detach_context(struct cxl_context *ctx)
267 268
268 /* Decrease the mm count on the context */ 269 /* Decrease the mm count on the context */
269 cxl_context_mm_count_put(ctx); 270 cxl_context_mm_count_put(ctx);
271 if (ctx->mm)
272 mm_context_remove_copro(ctx->mm);
270 ctx->mm = NULL; 273 ctx->mm = NULL;
271 274
272 return 0; 275 return 0;