mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-12 13:55:32 +00:00
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: ba612aa8b4
('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>
This commit is contained in:
parent
edf5600870
commit
ff65212cc4
1 changed files with 1 additions and 0 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue