lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20260107-setlease-6-19-v1-4-85f034abcc57@kernel.org>
Date: Wed, 07 Jan 2026 09:20:12 -0500
From: Jeff Layton <jlayton@...nel.org>
To: Christian Brauner <brauner@...nel.org>, 
 Al Viro <viro@...iv.linux.org.uk>, Jan Kara <jack@...e.cz>, 
 Steve French <sfrench@...ba.org>, Paulo Alcantara <pc@...guebit.org>, 
 Ronnie Sahlberg <ronniesahlberg@...il.com>, 
 Shyam Prasad N <sprasad@...rosoft.com>, Tom Talpey <tom@...pey.com>, 
 Bharath SM <bharathsm@...rosoft.com>, Trond Myklebust <trondmy@...nel.org>, 
 Anna Schumaker <anna@...nel.org>, Eric Van Hensbergen <ericvh@...nel.org>, 
 Latchesar Ionkov <lucho@...kov.net>, 
 Dominique Martinet <asmadeus@...ewreck.org>, 
 Christian Schoenebeck <linux_oss@...debyte.com>, 
 Andreas Gruenbacher <agruenba@...hat.com>, Xiubo Li <xiubli@...hat.com>, 
 Ilya Dryomov <idryomov@...il.com>, Hans de Goede <hansg@...nel.org>, 
 NeilBrown <neil@...wn.name>
Cc: Christoph Hellwig <hch@...radead.org>, linux-cifs@...r.kernel.org, 
 samba-technical@...ts.samba.org, linux-kernel@...r.kernel.org, 
 linux-nfs@...r.kernel.org, v9fs@...ts.linux.dev, gfs2@...ts.linux.dev, 
 ceph-devel@...r.kernel.org, linux-fsdevel@...r.kernel.org, 
 Jeff Layton <jlayton@...nel.org>
Subject: [PATCH 4/6] gfs2: don't allow delegations to be set on directories

With the advent of directory leases, it's necessary to set the
->setlease() handler in directory file_operations to properly deny them.

In the "nolock" case however, there is no need to deny them.

Fixes: e6d28ebc17eb ("filelock: push the S_ISREG check down to ->setlease handlers")
Signed-off-by: Jeff Layton <jlayton@...nel.org>
---
 fs/gfs2/file.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/gfs2/file.c b/fs/gfs2/file.c
index b2d23c98c996553ee14f1969638e709a3d7ede1c..86376f0dbf3a553375b0064c9a1eff3bfa9651f5 100644
--- a/fs/gfs2/file.c
+++ b/fs/gfs2/file.c
@@ -1608,6 +1608,7 @@ const struct file_operations gfs2_dir_fops = {
 	.lock		= gfs2_lock,
 	.flock		= gfs2_flock,
 	.llseek		= default_llseek,
+	.setlease	= simple_nosetlease,
 	.fop_flags	= FOP_ASYNC_LOCK,
 };
 

-- 
2.52.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ