Patch "Revert "NFSD: Fix possible sleep during nfsd4_release_lockowner()"" has been added to the 4.19-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    Revert "NFSD: Fix possible sleep during nfsd4_release_lockowner()"

to the 4.19-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     revert-nfsd-fix-possible-sleep-during-nfsd4_release_lockowner.patch
and it can be found in the queue-4.19 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From f11d60053191d3917c11757666bc31023711b5d7 Mon Sep 17 00:00:00 2001
From: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 22 Jan 2024 15:29:27 -0800
Subject: Revert "NFSD: Fix possible sleep during nfsd4_release_lockowner()"

From: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

This reverts commit ef481b262bba4f454351eec43f024fec942c2d4c which is
commit ce3c4ad7f4ce5db7b4f08a1e237d8dd94b39180b upstream.

The maintainers ask it to be removed in this branch.

Cc: Dai Ngo <dai.ngo@xxxxxxxxxx>
Cc: Chuck Lever <chuck.lever@xxxxxxxxxx>
Cc: Neil Brown <neilb@xxxxxxx>
Cc: Jeff Layton <jlayton@xxxxxxxxxx>
Link: https://lore.kernel.org/linux-nfs/3162C5BC-8E7C-4A9A-815C-09297B56FA17@xxxxxxxxxx/T/#t
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 fs/nfsd/nfs4state.c |   12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -6392,12 +6392,16 @@ nfsd4_release_lockowner(struct svc_rqst
 		if (sop->so_is_open_owner || !same_owner_str(sop, owner))
 			continue;
 
-		if (atomic_read(&sop->so_count) != 1) {
-			spin_unlock(&clp->cl_lock);
-			return nfserr_locks_held;
+		/* see if there are still any locks associated with it */
+		lo = lockowner(sop);
+		list_for_each_entry(stp, &sop->so_stateids, st_perstateowner) {
+			if (check_for_locks(stp->st_stid.sc_file, lo)) {
+				status = nfserr_locks_held;
+				spin_unlock(&clp->cl_lock);
+				return status;
+			}
 		}
 
-		lo = lockowner(sop);
 		nfs4_get_stateowner(sop);
 		break;
 	}


Patches currently in stable-queue which might be from gregkh@xxxxxxxxxxxxxxxxxxx are

queue-4.19/wifi-rtlwifi-convert-lnkctl-change-to-pcie-cap-rmw-accessors.patch
queue-4.19/hid-wacom-correct-behavior-when-processing-some-confidence-false-touches.patch
queue-4.19/revert-usb-typec-class-fix-typec_altmode_put_partner-to-put-plugs.patch
queue-4.19/coresight-etm4x-fix-width-of-ccitmin-field.patch
queue-4.19/binder-use-epollerr-from-eventpoll.h.patch
queue-4.19/usb-mon-fix-atomicity-violation-in-mon_bin_vma_fault.patch
queue-4.19/fbdev-flush-deferred-work-in-fb_deferred_io_fsync.patch
queue-4.19/wifi-rtlwifi-remove-bogus-and-dangerous-aspm-disable-enable-code.patch
queue-4.19/usb-dwc-ep0-update-request-status-in-dwc3_ep0_stall_restart.patch
queue-4.19/revert-usb-dwc3-don-t-reset-device-side-if-dwc3-was-configured-as-host-only.patch
queue-4.19/f2fs-explicitly-null-terminate-the-xattr-list.patch
queue-4.19/binder-fix-race-between-mmput-and-do_exit.patch
queue-4.19/acpi-property-let-args-be-null-in-__acpi_node_get_pr.patch
queue-4.19/usb-phy-mxs-remove-config_usb_otg-condition-for-mxs_phy_is_otg_host.patch
queue-4.19/input-atkbd-use-ab83-as-id-when-skipping-the-getid-command.patch
queue-4.19/binder-fix-async-space-check-for-0-sized-buffers.patch
queue-4.19/revert-usb-dwc3-soft-reset-phy-on-probe-for-host.patch
queue-4.19/revert-asoc-atmel-remove-system-clock-tree-configuration-for-at91sam9g20ek.patch
queue-4.19/binder-fix-comment-on-binder_alloc_new_buf-return-value.patch
queue-4.19/serial-imx-correct-clock-error-message-in-function-p.patch
queue-4.19/xen-netback-don-t-produce-zero-size-skb-frags.patch
queue-4.19/usb-typec-class-fix-typec_altmode_put_partner-to-put-plugs.patch
queue-4.19/usb-chipidea-wait-controller-resume-finished-for-wakeup-irq.patch
queue-4.19/wifi-mwifiex-configure-bssid-consistently-when-starting-ap.patch
queue-4.19/revert-nfsd-fix-possible-sleep-during-nfsd4_release_lockowner.patch
queue-4.19/alsa-oxygen-fix-right-channel-of-capture-volume-mixer.patch
queue-4.19/uio-fix-use-after-free-in-uio_open.patch
queue-4.19/binder-fix-unused-alloc-free_async_space.patch
queue-4.19/tick-sched-fix-idle-and-iowait-sleeptime-accounting-vs-cpu-hotplug.patch




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux