Add the missing unlock before return from function
afu_ioctl_enable_p9_wait() in the error handling case.
Fixes: e948e06fc63a ("ocxl: Expose the thread_id needed for wait on POWER9")
Signed-off-by: Wei Yongjun <redacted>
---
drivers/misc/ocxl/file.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
@@ -139,8 +139,10 @@ static long afu_ioctl_enable_p9_wait(struct ocxl_context *ctx,// Locks both status & tidrmutex_lock(&ctx->status_mutex);if(!ctx->tidr){-if(set_thread_tidr(current))+if(set_thread_tidr(current)){+mutex_unlock(&ctx->status_mutex);return-ENOENT;+}ctx->tidr=current->thread.tidr;}
Add the missing unlock before return from function
afu_ioctl_enable_p9_wait() in the error handling case.
Fixes: e948e06fc63a ("ocxl: Expose the thread_id needed for wait on POWER9")
Signed-off-by: Wei Yongjun <redacted>
---
drivers/misc/ocxl/file.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
@@ -139,8 +139,10 @@ static long afu_ioctl_enable_p9_wait(struct ocxl_context *ctx,// Locks both status & tidrmutex_lock(&ctx->status_mutex);if(!ctx->tidr){-if(set_thread_tidr(current))+if(set_thread_tidr(current)){+mutex_unlock(&ctx->status_mutex);return-ENOENT;+}
O_o Thanks for fixing it
Acked-by: Frederic Barrat <redacted>
From: Michael Ellerman <hidden> Date: 2018-06-05 15:19:53
On Tue, 2018-06-05 at 09:16:21 UTC, Wei Yongjun wrote:
Add the missing unlock before return from function
afu_ioctl_enable_p9_wait() in the error handling case.
Fixes: e948e06fc63a ("ocxl: Expose the thread_id needed for wait on POWER9")
Signed-off-by: Wei Yongjun <redacted>
Reviewed-by: Alastair D'Silva <redacted>