diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2015-10-13 14:52:06 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-10-18 06:49:48 +0200 |
commit | ff65212cc4698f532c452a14fdb94a3b1d1f283d (patch) | |
tree | 746e5a4456f6bbeed5f0d92fe20a4f49bbd1fc96 /drivers/misc/mic | |
parent | mei: amthif: Do not compare bool to 0/1 (diff) | |
download | linux-ff65212cc4698f532c452a14fdb94a3b1d1f283d.tar.xz linux-ff65212cc4698f532c452a14fdb94a3b1d1f283d.zip |
misc: mic/scif: re-take a lock on error path
The caller expects that we take this lock again before returning
otherwise it you get double unlocks and races.
Fixes: ba612aa8b487 ('misc: mic: SCIF memory registration and unregistration')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Sudeep Dutt <sudeep.dutt@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/mic')
-rw-r--r-- | drivers/misc/mic/scif/scif_rma.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/misc/mic/scif/scif_rma.c b/drivers/misc/mic/scif/scif_rma.c index e2889967036a..980ef13b4cf6 100644 --- a/drivers/misc/mic/scif/scif_rma.c +++ b/drivers/misc/mic/scif/scif_rma.c @@ -680,6 +680,7 @@ int scif_unregister_window(struct scif_window *window) } } else { /* Return ENXIO since unregistration is in progress */ + mutex_lock(&ep->rma_info.rma_lock); return -ENXIO; } retry: |