summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Layton <jlayton@kernel.org>2024-07-12 14:26:44 +0300
committerChuck Lever <chuck.lever@oracle.com>2024-07-12 19:58:48 +0300
commit769d20028f45a4f442cfe558a32faba357a7f5e2 (patch)
tree2bc35533111d0253e3ff8a3046809608e5689e11
parenta3123341dc358952ce2bf8067fbdfb7eaadf71bb (diff)
downloadlinux-769d20028f45a4f442cfe558a32faba357a7f5e2.tar.xz
nfsd: nfsd_file_lease_notifier_call gets a file_lease as an argument
"data" actually refers to a file_lease and not a file_lock. Both structs have their file_lock_core as the first field though, so this bug should be harmless without struct randomization in play. Reported-by: Florian Evers <florian-evers@gmx.de> Closes: https://bugzilla.kernel.org/show_bug.cgi?id=219008 Fixes: 05580bbfc6bc ("nfsd: adapt to breakup of struct file_lock") Signed-off-by: Jeff Layton <jlayton@kernel.org> Tested-by: Florian Evers <florian-evers@gmx.de> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
-rw-r--r--fs/nfsd/filecache.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfsd/filecache.c b/fs/nfsd/filecache.c
index ad9083ca144b..f4704f5d4086 100644
--- a/fs/nfsd/filecache.c
+++ b/fs/nfsd/filecache.c
@@ -664,7 +664,7 @@ static int
nfsd_file_lease_notifier_call(struct notifier_block *nb, unsigned long arg,
void *data)
{
- struct file_lock *fl = data;
+ struct file_lease *fl = data;
/* Only close files for F_SETLEASE leases */
if (fl->c.flc_flags & FL_LEASE)