(try3-resend) Fix nfs_compat_user_ino64 so it doesn't cause problems if bit 31 or 63 are set in fileid
Subsystems (2)
PATCH 1/1 (try3-resend) Fix nfs_compat_user_ino64 so it doesn't cause problems if bit 31 or 63 are set in fileid
The problem was use of an int32, which when converted to a uint64 is sign extended resulting in a fileid that doesn't fit in 32 bits even though the intent of the function is to fit the fileid into 32 bits.
--- fs/nfs/inode.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)
fs/nfs/inode.c +5 -1
@@ -89,7 +89,11 @@ int nfs_wait_bit_killable(void *word)*/ u64 nfs_compat_user_ino64 (u64 fileid) { -int ino; +#ifdef CONFIG_COMPAT +compat_ulong_t ino; +#else +unsigned long ino; +#endif if (enable_ino64)return fileid;
Signature · 1 line
1.5.5.6
A message that is not in the archive (sent off-list or not yet received): [email protected]
Jeff Layton
Reviewed-byQuoted 17 lines · On Thu, 02 Dec 2010 11:31:23 -0800 Frank Filz <[email protected]> wrote:
The problem was use of an int32, which when converted to a uint64 is sign extended resulting in a fileid that doesn't fit in 32 bits even though the intent of the function is to fit the fileid into 32 bits.
Signed-off-by Frank Filz <[email protected]>--- fs/nfs/inode.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)fs/nfs/inode.c +0
-0@@ -89,7 +89,11 @@ int nfs_wait_bit_killable(void *word)*/ u64 nfs_compat_user_ino64 (u64 fileid)
fs/nfs/inode.c int nfs_wait_bit_killable(void *word) · line 99
Quoted 10 lines
fs/nfs/inode.c +5
-1{ -int ino; +#ifdef CONFIG_COMPAT +compat_ulong_t ino; +#else +unsigned long ino; +#endif if (enable_ino64)return fileid;
Looks like this patch fell through the cracks during the merge window?
In any case, it looks sane enough to me...