]> git.karo-electronics.de Git - karo-tx-linux.git/commit
fuse: fix return value of fuse_dev_write()
authorCsaba Henk <csaba@gluster.com>
Mon, 29 Jun 2009 01:26:53 +0000 (03:26 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 20 Jul 2009 03:38:56 +0000 (20:38 -0700)
commit0457e83ceec2a048a330713a3ae828c2fcd6c9f2
tree217ddbdc285c9ca27304a605d717215a0dbfd78b
parentf4d8cd6481fab1e7651e342b87c4828c548cbc52
fuse: fix return value of fuse_dev_write()

commit b4c458b3a23d76936e76678f2074b1528f129f7a upstream.

On 64 bit systems -- where sizeof(ssize_t) > sizeof(int) -- the following test
exposes a bug due to a non-careful return of an int or unsigned value:

implement a FUSE filesystem which sends an unsolicited notification to
the kernel with invalid opcode. The respective write to /dev/fuse
will return (1 << 32) - EINVAL with errno == 0 instead of -1 with
errno == EINVAL.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/fuse/dev.c