]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
fuse: fix pipe_buf_operations
authorMiklos Szeredi <mszeredi@suse.cz>
Wed, 22 Jan 2014 18:36:57 +0000 (19:36 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Feb 2014 21:55:27 +0000 (13:55 -0800)
commitcfb7ee5903fc7ac22a6f1c53647ee0836e6a35d0
tree121059442e66403bdf5c142aff7bfa5f4cec3a7f
parenteb45c9b3c78af85b8d96db02777913b796e027ca
fuse: fix pipe_buf_operations

commit 28a625cbc2a14f17b83e47ef907b2658576a32aa upstream.

Having this struct in module memory could Oops when if the module is
unloaded while the buffer still persists in a pipe.

Since sock_pipe_buf_ops is essentially the same as fuse_dev_pipe_buf_steal
merge them into nosteal_pipe_buf_ops (this is the same as
default_pipe_buf_ops except stealing the page from the buffer is not
allowed).

Reported-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/fuse/dev.c
fs/splice.c
include/linux/pipe_fs_i.h
net/core/skbuff.c