Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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: