Commit ff65212c authored by Dan Carpenter's avatar Dan Carpenter Committed by Greg Kroah-Hartman

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: ba612aa8 ('misc: mic: SCIF memory registration and unregistration')
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: default avatarSudeep Dutt <sudeep.dutt@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent edf56008
......@@ -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:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment