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

Commit bd020c77 authored by Alexander Aring's avatar Alexander Aring Committed by Greg Kroah-Hartman
Browse files

fs: dlm: interrupt posix locks only when process is killed



[ Upstream commit 59e45c758ca1b9893ac923dd63536da946ac333b ]

If a posix lock request is waiting for a result from user space
(dlm_controld), do not let it be interrupted unless the process
is killed. This reverts commit a6b1533e ("dlm: make posix locks
interruptible"). The problem with the interruptible change is
that all locks were cleared on any signal interrupt. If a signal
was received that did not terminate the process, the process
could continue running after all its dlm posix locks had been
cleared. A future patch will add cancelation to allow proper
interruption.

Cc: stable@vger.kernel.org
Fixes: a6b1533e ("dlm: make posix locks interruptible")
Signed-off-by: default avatarAlexander Aring <aahringo@redhat.com>
Signed-off-by: default avatarDavid Teigland <teigland@redhat.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent f61d5752
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -159,7 +159,7 @@ int dlm_posix_lock(dlm_lockspace_t *lockspace, u64 number, struct file *file,


	send_op(op);
	send_op(op);


	rv = wait_event_interruptible(recv_wq, (op->done != 0));
	rv = wait_event_killable(recv_wq, (op->done != 0));
	if (rv == -ERESTARTSYS) {
	if (rv == -ERESTARTSYS) {
		log_debug(ls, "%s: wait killed %llx", __func__,
		log_debug(ls, "%s: wait killed %llx", __func__,
			  (unsigned long long)number);
			  (unsigned long long)number);