Skip to contentSkip to conversation

Patch "nfs: fix v4.2 SEEK on files over 2 gigs" has been added to the 4.2-stable tree

PATCH [email protected] 1 participant 1 message Oct 17, 2015

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

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

nfs: fix v4.2 SEEK on files over 2 gigs

to the 4.2-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:

     nfs-fix-v4.2-seek-on-files-over-2-gigs.patch

and it can be found in the queue-4.2 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From 306a5549355966e480e0dcacdc6b9321d153e0c0 Mon Sep 17 00:00:00 2001

From: "J. Bruce Fields" <[email protected]>
Date: Wed, 16 Sep 2015 17:21:27 -0400
Subject: nfs: fix v4.2 SEEK on files over 2 gigs

From: "J. Bruce Fields" <[email protected]>

commit 306a5549355966e480e0dcacdc6b9321d153e0c0 upstream.

We're incorrectly assigning a loff_t return to an int. If SEEK_HOLE or SEEK_DATA returns an offset over 2^31 then the application will see a weird lseek() result (usually -EIO).

Fixes bdcc2cd14e4e "NFSv4.2: handle NFS-specific llseek errors"
---
 fs/nfs/nfs42proc.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
fs/nfs/nfs42proc.c +3 -1
@@ -175,10 +175,12 @@ loff_t nfs42_proc_llseek(struct file *fi
 {
 	struct nfs_server *server = NFS_SERVER(file_inode(filep));
 	struct nfs4_exception exception = { };
-	int err;
+	loff_t err;
 
 	do {
 		err = _nfs42_proc_llseek(filep, offset, whence);
+		if (err >= 0)
+			break;
 		if (err == -ENOTSUPP)
 			return -EOPNOTSUPP;
 		err = nfs4_handle_exception(server, err, &exception);

Patches currently in stable-queue which might be from [email protected] are

queue-4.2/svcrdma-fix-send_reply-scatter-gather-set-up.patch queue-4.2/nfs-fix-v4.2-seek-on-files-over-2-gigs.patch