]> git.proxmox.com Git - mirror_ubuntu-bionic-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)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Tue, 23 Apr 2019 15:51:48 +0000 (17:51 +0200)
commit3f2044c765d6e5699ec5d91c38b3d810bdca82a4
treeb44576382ef6cdbc195482971747ed61537a7b76
parent0118622a57a00597cce21a124fa636bd4afc3250
fuse: call pipe_buf_release() under pipe lock

BugLink: https://bugs.launchpad.net/bugs/1824553
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: dd3bb14f44a6 ("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>
(cherry picked from commit 9509941e9c534920ccc4771ae70bd6cbbe79df1c)
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
fs/fuse/dev.c