]> git.karo-electronics.de Git - karo-tx-linux.git/commit
fuse: fix ioctl when server is 32bit
authorMiklos Szeredi <mszeredi@suse.cz>
Tue, 30 Nov 2010 15:39:27 +0000 (16:39 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 21 Mar 2011 19:44:19 +0000 (12:44 -0700)
commitef93fe6db2f59649bd3ee094fcc52eb1cc0648b7
treef60d6ae61140bf02a29686c09cb8be61c4f98250
parent149062eb1b3be1295f11adb5c9d7d200c3996373
fuse: fix ioctl when server is 32bit

commit d9d318d39dd5cb686660504a3565aac453709ccc upstream.

If a 32bit CUSE server is run on 64bit this results in EIO being
returned to the caller.

The reason is that FUSE_IOCTL_RETRY reply was defined to use 'struct
iovec', which is different on 32bit and 64bit archs.

Work around this by looking at the size of the reply to determine
which struct was used.  This is only needed if CONFIG_COMPAT is
defined.

A more permanent fix for the interface will be to use the same struct
on both 32bit and 64bit.

Reported-by: "ccmail111" <ccmail111@yahoo.com>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
CC: Tejun Heo <tj@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/fuse/file.c