]> git.baikalelectronics.ru Git - kernel.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)
committerMiklos Szeredi <mszeredi@suse.cz>
Tue, 30 Jun 2009 18:06:23 +0000 (20:06 +0200)
commit88645728e88d2c632663cf0f02eb0d2e53a79520
tree5b256bf81066e41442fa776cb668156bb4d58804
parent89feb12dd08b870baab8a22265bbff269a80bcf8
fuse: fix return value of fuse_dev_write()

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>
CC: stable@kernel.org
fs/fuse/dev.c