]> git.baikalelectronics.ru Git - kernel.git/commit
fuse: call pipe_buf_release() under pipe lock
authorJann Horn <jannh@google.com>
Sat, 12 Jan 2019 01:39:05 +0000 (02:39 +0100)
committerMiklos Szeredi <mszeredi@redhat.com>
Wed, 16 Jan 2019 09:27:59 +0000 (10:27 +0100)
commit7ff0413526c7eff4380483a54b560e8a3253721d
tree4b6ee94635855b7826e54c455687a305f0761ff2
parent139cfb8ff9ea93a4127bc01fcc53a67149605b61
fuse: call pipe_buf_release() under pipe lock

Some of the pipe_buf_release() handlers seem to assume that the pipe is
locked - in particular, anon_pipe_buf_release() accesses pipe->tmp_page
without taking any extra locks. From a glance through the callers of
pipe_buf_release(), it looks like FUSE is the only one that calls
pipe_buf_release() without having the pipe locked.

This bug should only lead to a memory leak, nothing terrible.

Fixes: 2445cd516342 ("fuse: support splice() writing to fuse device")
Cc: stable@vger.kernel.org
Signed-off-by: Jann Horn <jannh@google.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/fuse/dev.c