diff options
Diffstat (limited to 'drivers/misc/cxl/context.c')
-rw-r--r-- | drivers/misc/cxl/context.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/misc/cxl/context.c b/drivers/misc/cxl/context.c index 6dde7a9d6a7e..262b88eac414 100644 --- a/drivers/misc/cxl/context.c +++ b/drivers/misc/cxl/context.c | |||
@@ -42,7 +42,7 @@ int cxl_context_init(struct cxl_context *ctx, struct cxl_afu *afu, bool master, | |||
42 | spin_lock_init(&ctx->sste_lock); | 42 | spin_lock_init(&ctx->sste_lock); |
43 | ctx->afu = afu; | 43 | ctx->afu = afu; |
44 | ctx->master = master; | 44 | ctx->master = master; |
45 | ctx->pid = NULL; /* Set in start work ioctl */ | 45 | ctx->pid = ctx->glpid = NULL; /* Set in start work ioctl */ |
46 | mutex_init(&ctx->mapping_lock); | 46 | mutex_init(&ctx->mapping_lock); |
47 | ctx->mapping = mapping; | 47 | ctx->mapping = mapping; |
48 | 48 | ||
@@ -217,7 +217,11 @@ int __detach_context(struct cxl_context *ctx) | |||
217 | WARN_ON(cxl_detach_process(ctx) && | 217 | WARN_ON(cxl_detach_process(ctx) && |
218 | cxl_adapter_link_ok(ctx->afu->adapter)); | 218 | cxl_adapter_link_ok(ctx->afu->adapter)); |
219 | flush_work(&ctx->fault_work); /* Only needed for dedicated process */ | 219 | flush_work(&ctx->fault_work); /* Only needed for dedicated process */ |
220 | |||
221 | /* release the reference to the group leader and mm handling pid */ | ||
220 | put_pid(ctx->pid); | 222 | put_pid(ctx->pid); |
223 | put_pid(ctx->glpid); | ||
224 | |||
221 | cxl_ctx_put(); | 225 | cxl_ctx_put(); |
222 | return 0; | 226 | return 0; |
223 | } | 227 | } |