From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0CF68EB64DC for ; Fri, 21 Jul 2023 07:04:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229782AbjGUHEK (ORCPT ); Fri, 21 Jul 2023 03:04:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45382 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229911AbjGUHEJ (ORCPT ); Fri, 21 Jul 2023 03:04:09 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A79AF2715 for ; Fri, 21 Jul 2023 00:04:05 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 407A06112C for ; Fri, 21 Jul 2023 07:04:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 28D33C433C7; Fri, 21 Jul 2023 07:04:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1689923044; bh=tvz9EkzV5+nY+s5i++hzVl3OGB/vUNNKLje82bGU4kg=; h=Subject:To:Cc:From:Date:From; b=Wb2aedlGePj1G9XrhYSR00iIXgPLI4rbnwgj6gFrn2ijsuPx+mykbCC993VbkQIed OPXvAe6XPau+709XF+X+Hd1E4FomthBnsXF5CBGU8j+VHADxTxXTNkDw17Oj+5hKhB LMWWabPTC5iq24dUacchgCSDJUY4JfPDwTy7cqdI= Subject: FAILED: patch "[PATCH] fs: dlm: interrupt posix locks only when process is killed" failed to apply to 4.14-stable tree To: aahringo@redhat.com, teigland@redhat.com Cc: From: Date: Fri, 21 Jul 2023 09:03:53 +0200 Message-ID: <2023072153-strongbox-spoon-5731@gregkh> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org The patch below does not apply to the 4.14-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . To reproduce the conflict and resubmit, you may use the following commands: git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-4.14.y git checkout FETCH_HEAD git cherry-pick -x 59e45c758ca1b9893ac923dd63536da946ac333b # git commit -s git send-email --to '' --in-reply-to '2023072153-strongbox-spoon-5731@gregkh' --subject-prefix 'PATCH 4.14.y' HEAD^.. Possible dependencies: 59e45c758ca1 ("fs: dlm: interrupt posix locks only when process is killed") a800ba77fd28 ("dlm: rearrange async condition return") bcbb4ba6c9ba ("dlm: cleanup plock_op vs plock_xop") 42252d0d2aa9 ("dlm: fix plock invalid read") thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From 59e45c758ca1b9893ac923dd63536da946ac333b Mon Sep 17 00:00:00 2001 From: Alexander Aring Date: Fri, 19 May 2023 11:21:26 -0400 Subject: [PATCH] fs: dlm: interrupt posix locks only when process is killed 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 a6b1533e9a57 ("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: a6b1533e9a57 ("dlm: make posix locks interruptible") Signed-off-by: Alexander Aring Signed-off-by: David Teigland diff --git a/fs/dlm/plock.c b/fs/dlm/plock.c index fea2157fac5b..31bc601ee3d8 100644 --- a/fs/dlm/plock.c +++ b/fs/dlm/plock.c @@ -155,7 +155,7 @@ int dlm_posix_lock(dlm_lockspace_t *lockspace, u64 number, struct file *file, send_op(op); - rv = wait_event_interruptible(recv_wq, (op->done != 0)); + rv = wait_event_killable(recv_wq, (op->done != 0)); if (rv == -ERESTARTSYS) { spin_lock(&ops_lock); /* recheck under ops_lock if we got a done != 0,