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>] [day] [month] [year] [list]
Date:	Sun, 4 Aug 2013 11:30:25 -0700 (PDT)
From:	Hugh Dickins <hughd@...gle.com>
To:	Linus Torvalds <torvalds@...ux-foundation.org>
cc:	Jie Liu <jeff.liu@...cle.com>, Dave Chinner <david@...morbit.com>,
	Al Viro <viro@...iv.linux.org.uk>, linux-kernel@...r.kernel.org
Subject: [PATCH] tmpfs: fix SEEK_DATA/SEEK_HOLE regression

Commit 46a1c2c7ae53 ("vfs: export lseek_execute() to modules")
broke the tmpfs SEEK_DATA/SEEK_HOLE implementation, because
vfs_setpos() converts the carefully prepared -ENXIO to -EINVAL.
Other filesystems avoid it in error cases: do the same in tmpfs.

Signed-off-by: Hugh Dickins <hughd@...gle.com>
---

 mm/shmem.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- 3.11-rc3/mm/shmem.c	2013-07-14 17:10:16.648003652 -0700
+++ linux/mm/shmem.c	2013-08-04 10:49:52.208372436 -0700
@@ -1798,7 +1798,8 @@ static loff_t shmem_file_llseek(struct f
 		}
 	}
 
-	offset = vfs_setpos(file, offset, MAX_LFS_FILESIZE);
+	if (offset >= 0)
+		offset = vfs_setpos(file, offset, MAX_LFS_FILESIZE);
 	mutex_unlock(&inode->i_mutex);
 	return offset;
 }
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ