Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.kernel > #91376

Bug#1128861: Regression: Missing check in nfsd_permission() causes -ENOLCK No locks available

Path csiph.com!weretis.net!feeder8.news.weretis.net!fu-berlin.de!bofh.it!news.nic.it!robomod
From Tj <tj.iam.tj@proton.me>
Newsgroups linux.debian.bugs.dist, linux.debian.kernel
Subject Bug#1128861: Regression: Missing check in nfsd_permission() causes -ENOLCK No locks available
Date Tue, 24 Feb 2026 03:20:01 +0100
Message-ID <MrQbL-2Sdk-9@gated-at.bofh.it> (permalink)
References <MrJWG-2NTx-3@gated-at.bofh.it>
X-Mailbox-Line From debian-bugs-dist-request@lists.debian.org Tue Feb 24 02:13:08 2026
Old-Return-Path <debbugs@buxtehude.debian.org>
X-Spam-Flag NO
X-Spam-Score 1.049
Reply-To Tj <tj.iam.tj@proton.me>, 1128861@bugs.debian.org
Resent-To debian-bugs-dist@lists.debian.org
Resent-Cc debian-kernel@lists.debian.org
X-Debian-Pr-Message followup 1128861
X-Debian-Pr-Package src:linux
X-Debian-Pr-Source linux
Feedback-ID 113488376:user:proton
X-Pm-Message-ID 070dfc1e520590817ffbb2e91b91c20970ddd6d0
MIME-Version 1.0
Content-Type text/plain; charset=utf-8
Content-Transfer-Encoding quoted-printable
X-Debian-Message from BTS
X-Mailing-List <debian-bugs-dist@lists.debian.org> archive/latest/1954788
List-ID <debian-bugs-dist.lists.debian.org>
List-URL <https://lists.debian.org/debian-bugs-dist/>
Approved robomod@news.nic.it
Lines 51
Organization linux.* mail to news gateway
Sender robomod@news.nic.it
X-Original-Cc linux-nfs@vger.kernel.org, Olga Kornievskaia <okorniev@redhat.com>, stable@vger.kernel.org
X-Original-Date Tue, 24 Feb 2026 02:09:15 +0000
X-Original-Message-ID <c0f15088-3fc0-487a-9f24-cf89c158420d@proton.me>
X-Original-References <177187492815.425331.14320091315652332093.reportbug@nimble>
Xref csiph.com linux.debian.bugs.dist:1283398 linux.debian.kernel:91376

Cross-posted to 2 groups.

Show key headers only | View raw


Upstream commit 4cc9b9f2bf4dfe13fe573 "nfsd: refine and rename 
NFSD_MAY_LOCK" and
  stable v6.12.54 commit 18744bc56b0ec  (re)moves checks from 
fs/nfsd/vfs.c::nfsd_permission().

  This causes NFS clients to see

$ flock -e -w 4 /srv/NAS/test/debian-13.3.0-amd64-netinst.iso sleep 1
flock: /srv/NAS/test/debian-13.3.0-amd64-netinst.iso: No locks available

Keeping the check in nfsd_permission() whilst also copying it to 
fs/nfsd/nfsfh.c::__fh_verify() resolves the issue.

This was discovered on the Debian openQA infrastructure server when 
upgrading kernel from v6.12.48 to later v6.12.y where worker hosts (with 
any earlier or later kernel version) pass NFSv3 mounted ISO images to 
qemu-system-x86_64 and it reports:

!!! : qemu-system-x86_64: -device 
scsi-cd,id=cd0-device,drive=cd0-overlay0,serial=cd0: Failed to get 
"consistent read" lock: No locks available
QEMU: Is another process using the image 
[/var/lib/openqa/pool/2/20260223-1-debian-testing-amd64-netinst.iso]?

A simple reproducer with the server using:

# cat /etc/exports.d/test.exports
/srv/NAS/test 
fdff::/64(fsid=0,rw,no_root_squash,sync,no_subtree_check,auth_nlm)

and clients using:

# mount -t nfs [fdff::2]:/srv/NAS/test /srv/NAS/test -o 
proto=tcp6,ro,fsc,soft

will trigger the error as shown above:

$ flock -e -w 4 /srv/NAS/test/debian-13.3.0-amd64-netinst.iso sleep 1
flock: /srv/NAS/test/debian-13.3.0-amd64-netinst.iso: No locks available

A simple test program calling fcntl() with the same arguments QEMU uses 
also fails in the same way.

$ ./nfs3_range_lock_test 
/srv/NAS/test/debian-13.3.0-amd64-netinst.{iso,overlay}
Opened base file: /srv/NAS/test/debian-13.3.0-amd64-netinst.iso
Opened overlay file: /srv/NAS/test/debian-13.3.0-amd64-netinst.overlay
Attempting lock at 4 on /srv/NAS/test/debian-13.3.0-amd64-netinst.iso
fcntl(fd, F_GETLK, &fl) failed on base: No locks available
Attempting lock at 8 on /srv/NAS/test/debian-13.3.0-amd64-netinst.overlay
fcntl(fd, F_GETLK, &fl) failed on overlay: No locks available

Back to linux.debian.kernel | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Bug#1128861: linux: when serving NFS, client attempts to lock served files fail with "No locks available" Philip Hands <phil@hands.com> - 2026-02-23 20:40 +0100
  Bug#1128861: Acknowledgement (linux: when serving NFS, client attempts to lock served files fail with "No locks available") Philip Hands <phil@hands.com> - 2026-02-23 23:30 +0100
  Bug#1128861: Acknowledgement (linux: when serving NFS, client attempts to lock served files fail with "No locks available") Philip Hands <phil@hands.com> - 2026-02-24 00:40 +0100
    Bug#1128861: Acknowledgement (linux: when serving NFS, client attempts to lock served files fail with "No locks available") Philip Hands <phil@hands.com> - 2026-02-24 01:30 +0100
  Bug#1128861: Revert 18744bc56b0ec appears to resolve it Tj <tj.iam.tj@proton.me> - 2026-02-24 01:50 +0100
  Bug#1128861: Regression: Missing check in nfsd_permission() causes -ENOLCK No locks available Tj <tj.iam.tj@proton.me> - 2026-02-24 03:20 +0100
    Bug#1128861: Regression: Missing check in nfsd_permission() causes -ENOLCK No locks available Tj <tj.iam.tj@proton.me> - 2026-02-24 14:00 +0100
    Bug#1128861: Regression: Missing check in nfsd_permission() causes -ENOLCK No locks available Thorsten Leemhuis <regressions@leemhuis.info> - 2026-02-27 11:10 +0100
      Bug#1128861: Regression: Missing check in nfsd_permission() causes -ENOLCK No locks available Salvatore Bonaccorso <carnil@debian.org> - 2026-03-04 11:40 +0100
    Bug#1128861: Regression: Missing check in nfsd_permission() causes -ENOLCK No locks available Sasha Levin <sashal@kernel.org> - 2026-03-04 16:50 +0100
  Processed: Re: Bug#1128861: Regression: Missing check in  nfsd_permission() causes -ENOLCK No locks available "Debian Bug Tracking System" <owner@bugs.debian.org> - 2026-03-04 11:40 +0100
  Bug#1128861: [PATCH] lockd: fix TEST handling when not all permissions are available. Ben Hutchings <ben@decadent.org.uk> - 2026-03-25 21:40 +0100

csiph-web